Skip to content

Commit 674e953

Browse files
authored
fix(client): Prevent movies from playing in headless mode (#3066)
1 parent 39e01d9 commit 674e953

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

Core/GameEngine/Source/GameClient/Display.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ void Display::setHeight( UnsignedInt height )
201201

202202
void Display::playMovie( AsciiString movieName)
203203
{
204+
if (TheGlobalData->m_headless)
205+
return;
204206

205207
stopMovie();
206208

Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,6 +4135,8 @@ void InGameUI::createReplayControl()
41354135
// ------------------------------------------------------------------------------------------------
41364136
void InGameUI::playMovie( const AsciiString& movieName )
41374137
{
4138+
if (TheGlobalData->m_headless)
4139+
return;
41384140

41394141
stopMovie();
41404142

@@ -4190,6 +4192,8 @@ VideoBuffer* InGameUI::videoBuffer()
41904192
// ------------------------------------------------------------------------------------------------
41914193
void InGameUI::playCameoMovie( const AsciiString& movieName )
41924194
{
4195+
if (TheGlobalData->m_headless)
4196+
return;
41934197

41944198
stopCameoMovie();
41954199

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4249,6 +4249,8 @@ void InGameUI::createReplayControl()
42494249
// ------------------------------------------------------------------------------------------------
42504250
void InGameUI::playMovie( const AsciiString& movieName )
42514251
{
4252+
if (TheGlobalData->m_headless)
4253+
return;
42524254

42534255
stopMovie();
42544256

@@ -4304,6 +4306,8 @@ VideoBuffer* InGameUI::videoBuffer()
43044306
// ------------------------------------------------------------------------------------------------
43054307
void InGameUI::playCameoMovie( const AsciiString& movieName )
43064308
{
4309+
if (TheGlobalData->m_headless)
4310+
return;
43074311

43084312
stopCameoMovie();
43094313

0 commit comments

Comments
 (0)