diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index f2db2efc5f..852420a31c 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -1615,10 +1615,11 @@ bool win32_window_create(void *data, unsigned style, bool window_save_positions = settings->bools.video_window_save_positions; unsigned user_width = width; unsigned user_height = height; + const char *new_label = msg_hash_to_str(MSG_PROGRAM); #ifdef LEGACY_WIN32 - char *title_local = utf8_to_local_string_alloc(new_label2); + char *title_local = utf8_to_local_string_alloc(new_label); #else - wchar_t *title_local = utf8_to_utf16_string_alloc(msg_hash_to_str(MSG_PROGRAM)); + wchar_t *title_local = utf8_to_utf16_string_alloc(new_label); #endif if (window_save_positions && !fullscreen) diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index b1919f06cc..26fc43fdf7 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -117,12 +117,11 @@ static void ui_window_win32_set_title(void *data, char *buf) { ui_window_win32_t *window = (ui_window_win32_t*)data; #ifdef LEGACY_WIN32 - char *title_local = utf8_to_local_string_alloc(new_label2); - SetWindowText(window->hwnd, title_local); + char *title_local = utf8_to_local_string_alloc(buf); #else - wchar_t *title_local = utf8_to_utf16_string_alloc(buf); - SetWindowTextW(window->hwnd, title_local); + wchar_t *title_local = utf8_to_utf16_string_alloc(buf); #endif + SetWindowTextW(window->hwnd, title_local); free(title_local); }