mirror of
https://github.com/diasurgical/DevilutionX.git
synced 2026-10-11 22:29:54 +00:00
Skip video playback in HeadlessMode
play_movie() only early-outs for demo playback, but SVidPlayBegin requires the SDL video subsystem that HeadlessMode intentionally never initializes, so any real-time (non-demo) headless session crashes on the first movie: the Lazarus in-game movie (gendata\fprst3.smk) and the ending cinematics when Diablo dies. Mirror the existing demo::IsRunning() early-out; the surrounding fade/redraw paths are already headless-safe, and this one guard covers every callsite (intro logos, Lazarus, victory/ending, credits loop). No behavior change in graphical builds.
This commit is contained in:
committed by
Gleb Mazovetskiy
parent
d56af8aaf2
commit
a02893ca3f
@@ -21,6 +21,7 @@
|
||||
#include "engine/demomode.h"
|
||||
#include "engine/events.hpp"
|
||||
#include "engine/sound.h"
|
||||
#include "headless_mode.hpp"
|
||||
#include "hwcursor.hpp"
|
||||
#include "storm/storm_svid.h"
|
||||
#include "utils/display.h"
|
||||
@@ -38,6 +39,11 @@ void play_movie(const char *pszMovie, bool userCanClose)
|
||||
if (demo::IsRunning())
|
||||
return;
|
||||
|
||||
// Video playback requires the SDL video subsystem, which HeadlessMode
|
||||
// intentionally does not initialize.
|
||||
if (HeadlessMode)
|
||||
return;
|
||||
|
||||
movie_playing = true;
|
||||
|
||||
sound_disable_music(true);
|
||||
|
||||
Reference in New Issue
Block a user