Program slows down system
Hi you all,
I've got a problem and I've tried everything to fix it, or even to see what is wrong. It's like this: the messages of the window are slow. Or for that matter, my whole program slows everything else down, including itself.
It's really weird because I've made more programs like this one that work fine. I've tried them out just now and they still work.
They are game (simple game) programs that for now just draw something. I use the following game loop:
I have this in both programs (one works, the other is slow). I use DirectX in both and blt in the same way in both. But one slows down the system and the other doesn't.
if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
if (GetMessage(&msg, NULL, 0, 0))
What could be wrong here? (or do you know of anything that could cause this?)
BTW if I do nothing in DoGame() the slow program works fine...
(By slowing the system I mean, everything is slowed down, clicking, pressing a button (also ALT-F4), dragging the window, showing other windows, etc)