Skip to content

Commit

Permalink
re-align code
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed May 27, 2024
1 parent 07a9ba7 commit 9674705
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9674705

Please sign in to comment.