Here is my loop;
1. Is this the best loop that should be in use?
2. Unfortunately the screen flickers at fullscreen mode every 1-2 seconds. However, if I move the mouse around quickly in circles constantly there is 0 flickering. As soon as I stop it returns. This makes me think that there is a problem with the message loop somewhere. No DirectDraw functions return any errors. Any ideas?
Code:
while (msg.message != WM_QUIT)
{
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Dostuffhere()
}
{
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Dostuffhere()
}
1. Is this the best loop that should be in use?
2. Unfortunately the screen flickers at fullscreen mode every 1-2 seconds. However, if I move the mouse around quickly in circles constantly there is 0 flickering. As soon as I stop it returns. This makes me think that there is a problem with the message loop somewhere. No DirectDraw functions return any errors. Any ideas?