projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with trying to display exit message screen in headless mode
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 895e9185173e2f5e1c52481005795ebead8430b2..eeb8af52d01dff918c67ccd82e3ad084cc4812bd 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-5878,6
+5878,10
@@
void KeyboardAutoRepeatOffUnlessAutoplay()
void DisplayExitMessage(char *format, va_list ap)
{
void DisplayExitMessage(char *format, va_list ap)
{
+ // also check for initialized video (headless flag may be temporarily unset)
+ if (program.headless || !video.initialized)
+ return;
+
// check if draw buffer and fonts for exit message are already available
if (drawto == NULL || font_initial[NUM_INITIAL_FONTS - 1].bitmap == NULL)
return;
// check if draw buffer and fonts for exit message are already available
if (drawto == NULL || font_initial[NUM_INITIAL_FONTS - 1].bitmap == NULL)
return;
@@
-5991,6
+5995,7
@@
void OpenAll()
print_timestamp_time("[init setup/config stuff]");
print_timestamp_time("[init setup/config stuff]");
+ InitVideoDefaults();
InitVideoDisplay();
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
InitVideoDisplay();
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);