From 9674705685284bb7a6b6b6450ba1235c6bd99fbe Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Mon, 27 May 2024 23:54:19 +0200 Subject: [PATCH] re-align code --- src/dd.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/dd.c b/src/dd.c index cd03c7b148..9a3e4aa862 100644 --- a/src/dd.c +++ b/src/dd.c @@ -579,28 +579,13 @@ HRESULT dd_RestoreDisplayMode() HRESULT dd_SetDisplayMode(DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwFlags) { if (!dwWidth) - { - dwWidth = g_ddraw.width; - - if (!dwWidth) - dwWidth = 800; - } + dwWidth = g_ddraw.width ? g_ddraw.width : 800; if (!dwHeight) - { - dwHeight = g_ddraw.height; - - if (!dwHeight) - dwHeight = 600; - } + dwHeight = g_ddraw.height ? g_ddraw.height : 600; if (!dwBPP) - { - dwBPP = g_ddraw.bpp; - - if (!dwBPP) - dwBPP = 16; - } + dwBPP = g_ddraw.bpp ? g_ddraw.bpp : 16; if (dwBPP != 8 && dwBPP != 16 && dwBPP != 32) return DDERR_INVALIDMODE;