added flag to (not) show scaling in title to default configuration settings
authorHolger Schemel <info@artsoft.org>
Tue, 14 Mar 2017 22:40:13 +0000 (23:40 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 11 Oct 2017 07:19:33 +0000 (09:19 +0200)
src/config.c
src/files.c
src/libgame/system.h

index 02083581813486a7a636c2fc1b397532434b7b91..8a92ebb445cce90a857ad67794d2dd654ce6cb79 100644 (file)
@@ -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
index 33b174de4e367911d92531c65ecf778d6366eb30..4fd17038204a1dce81521c71a3f83df4aa0d4735 100644 (file)
@@ -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;
index 630dce8573face1ad389ca539d2aa4d72fedb1f6..b2187d78cda9ac18b57f0d6fb5cf030917aff597 100644 (file)
@@ -1090,6 +1090,7 @@ struct SetupInternalInfo
   int default_window_height;
 
   boolean choose_from_top_leveldir;
+  boolean show_scaling_in_title;
 };
 
 struct SetupDebugInfo