Use a semaphore object to synchronize rendering thread with the game
This commit is contained in:
parent
5192ebc44f
commit
a40282013b
6 changed files with 20 additions and 8 deletions
|
@ -50,7 +50,7 @@ DWORD WINAPI render_soft_main(void)
|
|||
frame_len = 1000.0f / ddraw->render.maxfps;
|
||||
}
|
||||
|
||||
while (ddraw->render.run)
|
||||
while (ddraw->render.run && WaitForSingleObject(ddraw->render.sem, INFINITE) == WAIT_OBJECT_0)
|
||||
{
|
||||
if(ddraw->render.maxfps > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue