From: Holger Schemel Date: Fri, 17 Oct 2014 22:04:34 +0000 (+0200) Subject: fixed window title for non-SDL2 target (window scaling info) X-Git-Tag: 4.0.0.0-rc1~330 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b40330e01f14051b3b15a7dac50e1568a9cf4455;p=rocksndiamonds.git fixed window title for non-SDL2 target (window scaling info) --- diff --git a/src/config.c b/src/config.c index 955c4979..da6d1a96 100644 --- a/src/config.c +++ b/src/config.c @@ -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;