[gameprogrammer] game taking up a lot of cpu when minimized
- From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Sat, 25 Apr 2009 20:21:13 -0700
ok so i think this is a fairly common problem, cause i hit it before when
working on a project with some other people but i dont remember how it was
solved....
im makin a game on the windows platform in directx, and when my game window
is obscured or it's minimized, etc, it eats up a ton of cpu.
i'm guessing it's because vsync isn't there to slow it down (since nothing
is being rendered) but im not sure.
When a d3d error of D3DERR_DEVICELOST is returned, i have it sleep for 500ms
before going to the next game loop. I thought that was the fix for this
problem but im finding that i am NEVER getting the device lost error when
minimizing or the window is obscured.
anyone know how to handle this issue?
Thanks!
Alan
Other related posts: