1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 14:14:47 +01:00

fix autorenderer bug on win xp

This commit is contained in:
FunkyFr3sh 2019-08-07 03:21:20 +02:00
parent 0caaf3677a
commit 92e4a85160
2 changed files with 4 additions and 7 deletions

View File

@ -1339,11 +1339,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
mouse_unlock();
real_SetWindowPos(ddraw->hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
real_SetWindowPos(ddraw->hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if (!ddraw->wine)
{
ShowWindow(ddraw->hWnd, SW_MINIMIZE);
ShowWindow(ddraw->hWnd, SW_RESTORE);
}
mouse_lock();
return 0;
}

View File

@ -29,6 +29,8 @@ DWORD WINAPI render_soft_main(void)
char warningText[512] = { 0 };
if (ShowDriverWarning)
{
ShowDriverWarning = FALSE;
if (!ddraw->windowed)
PostMessage(ddraw->hWnd, WM_AUTORENDERER, 0, 0);
@ -37,8 +39,8 @@ DWORD WINAPI render_soft_main(void)
"-WARNING- Using slow software rendering, please update your graphics card driver (%s)",
strlen(OpenGL_Version) > 10 ? "" : OpenGL_Version);
}
else
Sleep(500);
Sleep(500);
DWORD lastTick = 0;
int maxFPS = ddraw->render.maxfps;