Buildfix for MSVC

This commit is contained in:
twinaphex 2021-10-12 11:58:22 +02:00
parent 290bc214e3
commit 849ed7fc3d
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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);
}