Skip to content

Commit

Permalink
don't force devmode on for infantry (keep it for zone list only)
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Mar 28, 2024
1 parent 75f5c24 commit b89b184
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ static void cfg_create_ini()
"\n"
"; Infantry Online\n"
"[infantry]\n"
"devmode=true\n"
"resolutions=2\n"
"infantryhack=true\n"
"max_resolutions=90\n"
Expand Down
5 changes: 4 additions & 1 deletion src/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,22 +1192,25 @@ HRESULT dd_SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
/* Infantry Online Zone List Window */
if (g_config.infantryhack)
{
static BOOL windowed, fullscreen;
static BOOL windowed, fullscreen, devmode;

if (dwFlags & DDSCL_FULLSCREEN)
{
g_config.windowed = windowed;
g_config.fullscreen = fullscreen;
g_config.devmode = devmode;
}
else if (dwFlags & DDSCL_NOWINDOWCHANGES)
{
windowed = g_config.windowed;
fullscreen = g_config.fullscreen;
devmode = g_config.devmode;

if (GetMenu(g_ddraw.hwnd) != NULL)
{
g_config.windowed = TRUE;
g_config.fullscreen = FALSE;
g_config.devmode = TRUE;
}

dd_SetDisplayMode(640, 480, 16, SDM_MODE_SET_BY_GAME);
Expand Down

0 comments on commit b89b184

Please sign in to comment.