fixed window title for non-SDL2 target (window scaling info)
authorHolger Schemel <info@artsoft.org>
Fri, 17 Oct 2014 22:04:34 +0000 (00:04 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 17 Oct 2014 22:04:34 +0000 (00:04 +0200)
src/config.c

index 955c4979f54ad64703d38f033a3e93bdfe9ad399..da6d1a9613da12434bbf0f727ba29f52c22d3a7e 100644 (file)
@@ -53,6 +53,8 @@ char *getWindowTitleString()
 
   checked_free(window_title_string);
 
+#if defined(TARGET_SDL2)
+
 #ifdef DEBUG
   window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 +
                                       strlen(getCompileDateString()) + 2 + 1);
@@ -65,6 +67,23 @@ char *getWindowTitleString()
 
   sprintf(window_title_string, "%s (%d %%)",
          getProgramInitString(), setup.window_scaling_percent);
+#endif
+
+#else
+
+#ifdef DEBUG
+  window_title_string = checked_malloc(strlen(getProgramInitString()) + 1 +
+                                      strlen(getCompileDateString()) + 2 + 1);
+
+  sprintf(window_title_string, "%s [%s]",
+         getProgramInitString(), getCompileDateString());
+#else
+  window_title_string = checked_malloc(strlen(getProgramInitString()) + 1);
+
+  sprintf(window_title_string, "%s",
+         getProgramInitString());
+#endif
+
 #endif
 
   return window_title_string;