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

use FAILED macro for d3d9 present

This commit is contained in:
FunkyFr3sh 2018-12-10 03:46:12 +01:00
parent 6558ddb000
commit 167bb4238c

View File

@ -410,7 +410,7 @@ DWORD WINAPI render_d3d9_main(void)
IDirect3DDevice9_DrawPrimitive(D3dDev, D3DPT_TRIANGLESTRIP, 0, 2);
IDirect3DDevice9_EndScene(D3dDev);
if (IDirect3DDevice9_Present(D3dDev, NULL, NULL, NULL, NULL) == D3DERR_DEVICELOST)
if (FAILED(IDirect3DDevice9_Present(D3dDev, NULL, NULL, NULL, NULL)))
{
DWORD_PTR dwResult;
SendMessageTimeout(ddraw->hWnd, WM_D3D9DEVICELOST, 0, 0, 0, 1000, &dwResult);