From: Holger Schemel Date: Tue, 14 Mar 2017 22:40:13 +0000 (+0100) Subject: added flag to (not) show scaling in title to default configuration settings X-Git-Tag: 4.0.1.1~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=40d5b9f612f42fc1c5bc3cbedefe642e3295acf9;p=rocksndiamonds.git added flag to (not) show scaling in title to default configuration settings --- diff --git a/src/config.c b/src/config.c index 02083581..8a92ebb4 100644 --- a/src/config.c +++ b/src/config.c @@ -69,14 +69,23 @@ char *getWindowTitleString() window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 + strlen(getSourceDateString()) + 2 + 1); - sprintf(window_title_string, "%s (%d %%) [%s]", - getProgramInitString(), video.window_scaling_percent, - getSourceDateString()); + if (setup.internal.show_scaling_in_title) + sprintf(window_title_string, "%s (%d %%) [%s]", + getProgramInitString(), video.window_scaling_percent, + getSourceDateString()); + else + sprintf(window_title_string, "%s [%s]", + getProgramInitString(), + getSourceDateString()); #else window_title_string = checked_malloc(strlen(getProgramInitString()) + 20); - sprintf(window_title_string, "%s (%d %%)", - getProgramInitString(), video.window_scaling_percent); + if (setup.internal.show_scaling_in_title) + sprintf(window_title_string, "%s (%d %%)", + getProgramInitString(), video.window_scaling_percent); + else + sprintf(window_title_string, "%s", + getProgramInitString()); #endif #else diff --git a/src/files.c b/src/files.c index 33b174de..4fd17038 100644 --- a/src/files.c +++ b/src/files.c @@ -8077,10 +8077,11 @@ void SaveScore(int nr) #define SETUP_TOKEN_INT_FALLBACK_MUSIC_FILE 13 #define SETUP_TOKEN_INT_DEFAULT_LEVEL_SERIES 14 #define SETUP_TOKEN_INT_CHOOSE_FROM_TOP_LEVELDIR 15 -#define SETUP_TOKEN_INT_DEFAULT_WINDOW_WIDTH 16 -#define SETUP_TOKEN_INT_DEFAULT_WINDOW_HEIGHT 17 +#define SETUP_TOKEN_INT_SHOW_SCALING_IN_TITLE 16 +#define SETUP_TOKEN_INT_DEFAULT_WINDOW_WIDTH 17 +#define SETUP_TOKEN_INT_DEFAULT_WINDOW_HEIGHT 18 -#define NUM_INTERNAL_SETUP_TOKENS 18 +#define NUM_INTERNAL_SETUP_TOKENS 19 /* debug setup */ #define SETUP_TOKEN_DEBUG_FRAME_DELAY_0 0 @@ -8272,6 +8273,7 @@ static struct TokenInfo internal_setup_tokens[] = { TYPE_STRING, &sxi.fallback_music_file, "fallback_music_file" }, { TYPE_STRING, &sxi.default_level_series, "default_level_series" }, { TYPE_BOOLEAN,&sxi.choose_from_top_leveldir, "choose_from_top_leveldir" }, + { TYPE_BOOLEAN,&sxi.show_scaling_in_title, "show_scaling_in_title" }, { TYPE_INTEGER,&sxi.default_window_width, "default_window_width" }, { TYPE_INTEGER,&sxi.default_window_height, "default_window_height" }, }; @@ -8470,6 +8472,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->internal.default_level_series = getStringCopy(UNDEFINED_LEVELSET); si->internal.choose_from_top_leveldir = FALSE; + si->internal.show_scaling_in_title = TRUE; si->internal.default_window_width = WIN_XSIZE_DEFAULT; si->internal.default_window_height = WIN_YSIZE_DEFAULT; diff --git a/src/libgame/system.h b/src/libgame/system.h index 630dce85..b2187d78 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1090,6 +1090,7 @@ struct SetupInternalInfo int default_window_height; boolean choose_from_top_leveldir; + boolean show_scaling_in_title; }; struct SetupDebugInfo