Skip to content

Commit 08b8420

Browse files
authored
fix(headless): Set DX8Wrapper_IsWindowed to false to suppress assertion dialogs during shutdown (#2298)
1 parent a7553c8 commit 08b8420

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Generals/Code/GameEngine/Source/Common/CommandLine.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,13 @@ Int parseHeadless(char *args[], int num)
414414
TheWritableGlobalData->m_playIntro = FALSE;
415415
TheWritableGlobalData->m_afterIntro = TRUE;
416416
TheWritableGlobalData->m_playSizzle = FALSE;
417+
418+
// TheSuperHackers @fix bobtista 03/02/2026 Set DX8Wrapper_IsWindowed to false in headless
419+
// mode so that ignoringAsserts() works correctly throughout the entire process lifetime,
420+
// including during shutdown after TheGlobalData has been destroyed.
421+
extern bool DX8Wrapper_IsWindowed;
422+
DX8Wrapper_IsWindowed = false;
423+
417424
return 1;
418425
}
419426

GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,13 @@ Int parseHeadless(char *args[], int num)
414414
TheWritableGlobalData->m_playIntro = FALSE;
415415
TheWritableGlobalData->m_afterIntro = TRUE;
416416
TheWritableGlobalData->m_playSizzle = FALSE;
417+
418+
// TheSuperHackers @fix bobtista 03/02/2026 Set DX8Wrapper_IsWindowed to false in headless
419+
// mode so that ignoringAsserts() works correctly throughout the entire process lifetime,
420+
// including during shutdown after TheGlobalData has been destroyed.
421+
extern bool DX8Wrapper_IsWindowed;
422+
DX8Wrapper_IsWindowed = false;
423+
417424
return 1;
418425
}
419426

0 commit comments

Comments
 (0)