tCheck score file before setting up log handler - vaccinewars - be a doctor and… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 6258f4ebe9d257d980c179b4ad68c31531310ea5 | |
parent 1aa97d4cfdf20f930b0158fc9f2a6d03f15ce68d | |
Author: Ben Webb <[email protected]> | |
Date: Wed, 27 Jan 2021 00:30:40 -0800 | |
Check score file before setting up log handler | |
We can't report failure to open the high score file | |
with a dialog anyway, since we haven't started the main | |
window yet. Log any errors to stderr instead. | |
Diffstat: | |
M src/gui_client/gtk_client.c | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c | |
t@@ -2210,15 +2210,15 @@ gboolean GtkLoop(int *argc, char **argv[], | |
/* Set up message handlers */ | |
ClientMessageHandlerPt = HandleClientMessage; | |
+ if (!CheckHighScoreFileConfig()) { | |
+ return TRUE; | |
+ } | |
+ | |
/* Have the GLib log messages pop up in a nice dialog box */ | |
g_log_set_handler(NULL, | |
G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_WARNING | | |
G_LOG_LEVEL_CRITICAL, LogMessage, NULL); | |
- if (!CheckHighScoreFileConfig()) { | |
- return TRUE; | |
- } | |
- | |
SoundOpen(cmdline->plugin); | |
/* Create the main player */ |