From: Holger Schemel Date: Sun, 9 Apr 2017 21:45:23 +0000 (+0200) Subject: fixed default video depth not being initialized in headless mode X-Git-Tag: 4.1.0.0~128 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=dedebdc78822d9aa4da65633587a89c8eb55455e;p=rocksndiamonds.git fixed default video depth not being initialized in headless mode --- diff --git a/src/init.c b/src/init.c index 895e9185..adb7afdf 100644 --- a/src/init.c +++ b/src/init.c @@ -5991,6 +5991,7 @@ void OpenAll() print_timestamp_time("[init setup/config stuff]"); + InitVideoDefaults(); InitVideoDisplay(); InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); diff --git a/src/libgame/system.c b/src/libgame/system.c index aa9a4de1..ce418468 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -421,6 +421,11 @@ void LimitScreenUpdates(boolean enable) SDLLimitScreenUpdates(enable); } +void InitVideoDefaults(void) +{ + video.default_depth = 32; +} + void InitVideoDisplay(void) { if (program.headless) diff --git a/src/libgame/system.h b/src/libgame/system.h index cc9e45d9..cd7e5357 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1514,6 +1514,7 @@ void SetRedrawMaskFromArea(int, int, int, int); void LimitScreenUpdates(boolean); +void InitVideoDefaults(void); void InitVideoDisplay(void); void CloseVideoDisplay(void); void InitVideoBuffer(int, int, int, boolean);