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

retry until device was reset

This commit is contained in:
FunkyFr3sh 2023-08-15 08:59:26 +02:00
parent 26175acde7
commit 4c620b224f
2 changed files with 5 additions and 1 deletions

View File

@ -553,6 +553,9 @@ DWORD WINAPI d3d9_render_main(void)
{
DWORD_PTR result;
SendMessageTimeout(g_ddraw->hwnd, WM_D3D9DEVICELOST, 0, 0, 0, 1000, &result);
ReleaseSemaphore(g_ddraw->render.sem, 1, NULL);
Sleep(50);
}
#if _DEBUG

View File

@ -20,7 +20,8 @@ LRESULT CALLBACK fake_WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
#ifdef _DEBUG
if (uMsg != WM_MOUSEMOVE && uMsg != WM_NCMOUSEMOVE && uMsg != WM_NCHITTEST && uMsg != WM_SETCURSOR &&
uMsg != WM_KEYUP && uMsg != WM_KEYDOWN && uMsg != WM_CHAR && uMsg != WM_DEADCHAR && uMsg != WM_INPUT &&
uMsg != WM_UNICHAR && uMsg != WM_IME_CHAR && uMsg != WM_IME_KEYDOWN && uMsg != WM_IME_KEYUP && uMsg != WM_TIMER)
uMsg != WM_UNICHAR && uMsg != WM_IME_CHAR && uMsg != WM_IME_KEYDOWN && uMsg != WM_IME_KEYUP && uMsg != WM_TIMER &&
uMsg != WM_D3D9DEVICELOST)
{
TRACE(
" uMsg = %s (%d), wParam = %08X (%d), lParam = %08X (%d)\n",