Skip to content

Commit 7d6845f

Browse files
authored
tweak(debug): Add more headless checks in preparation for the CI Replay Check (#1382)
1 parent 4e4b731 commit 7d6845f

File tree

3 files changed

+17
-7
lines changed
  • Core/GameEngine/Source/Common/Audio
  • GeneralsMD/Code/GameEngine/Source/Common/System
  • Generals/Code/GameEngine/Source/Common/System

3 files changed

+17
-7
lines changed

Core/GameEngine/Source/Common/Audio/GameAudio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void AudioManager::init()
232232

233233
// determine if one of the music tracks exists. Since their now BIGd, one implies all.
234234
// If they don't exist, then attempt to load them from the CD.
235-
if (!isMusicAlreadyLoaded())
235+
if (!TheGlobalData->m_headless && !isMusicAlreadyLoaded())
236236
{
237237
m_musicPlayingFromCD = TRUE;
238238
while (TRUE)

Generals/Code/GameEngine/Source/Common/System/Debug.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,16 @@ static void doStackDump();
148148
// ----------------------------------------------------------------------------
149149
inline Bool ignoringAsserts()
150150
{
151+
if (!DX8Wrapper_IsWindowed)
152+
return true;
153+
if (TheGlobalData && TheGlobalData->m_headless)
154+
return true;
151155
#ifdef DEBUG_CRASHING
152-
return !DX8Wrapper_IsWindowed || (TheGlobalData&&TheGlobalData->m_debugIgnoreAsserts);
153-
#else
154-
return !DX8Wrapper_IsWindowed;
156+
if (TheGlobalData && TheGlobalData->m_debugIgnoreAsserts)
157+
return true;
155158
#endif
159+
160+
return false;
156161
}
157162

158163
// ----------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/Common/System/Debug.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,16 @@ static void doStackDump();
149149
// ----------------------------------------------------------------------------
150150
inline Bool ignoringAsserts()
151151
{
152+
if (!DX8Wrapper_IsWindowed)
153+
return true;
154+
if (TheGlobalData && TheGlobalData->m_headless)
155+
return true;
152156
#ifdef DEBUG_CRASHING
153-
return !DX8Wrapper_IsWindowed || (TheGlobalData&&TheGlobalData->m_debugIgnoreAsserts);
154-
#else
155-
return !DX8Wrapper_IsWindowed;
157+
if (TheGlobalData && TheGlobalData->m_debugIgnoreAsserts)
158+
return true;
156159
#endif
160+
161+
return false;
157162
}
158163

159164
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)