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

re-align code

This commit is contained in:
FunkyFr3sh 2024-05-27 23:54:19 +02:00
parent 07a9ba78db
commit 9674705685

View File

@ -579,28 +579,13 @@ HRESULT dd_RestoreDisplayMode()
HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFlags) HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFlags)
{ {
if (!dwWidth) if (!dwWidth)
{ dwWidth = g_ddraw.width ? g_ddraw.width : 800;
dwWidth = g_ddraw.width;
if (!dwWidth)
dwWidth = 800;
}
if (!dwHeight) if (!dwHeight)
{ dwHeight = g_ddraw.height ? g_ddraw.height : 600;
dwHeight = g_ddraw.height;
if (!dwHeight)
dwHeight = 600;
}
if (!dwBPP) if (!dwBPP)
{ dwBPP = g_ddraw.bpp ? g_ddraw.bpp : 16;
dwBPP = g_ddraw.bpp;
if (!dwBPP)
dwBPP = 16;
}
if (dwBPP != 8 && dwBPP != 16 && dwBPP != 32) if (dwBPP != 8 && dwBPP != 16 && dwBPP != 32)
return DDERR_INVALIDMODE; return DDERR_INVALIDMODE;