mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 08:37:41 +00:00
win32: fix non-ASCII text display in window title (#13089)
This commit is contained in:
parent
a5a9393b26
commit
39fd4677d9
@ -1615,20 +1615,22 @@ 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;
|
||||
wchar_t *title_wide = utf8_to_utf16_string_alloc(msg_hash_to_str(MSG_PROGRAM));
|
||||
|
||||
if (window_save_positions && !fullscreen)
|
||||
{
|
||||
user_width = g_win32->pos_width;
|
||||
user_height = g_win32->pos_height;
|
||||
}
|
||||
main_window.hwnd = CreateWindowEx(0,
|
||||
"RetroArch", msg_hash_to_str(MSG_PROGRAM),
|
||||
main_window.hwnd = CreateWindowExW(0,
|
||||
L"RetroArch", title_wide,
|
||||
style,
|
||||
fullscreen ? mon_rect->left : g_win32->pos_x,
|
||||
fullscreen ? mon_rect->top : g_win32->pos_y,
|
||||
user_width,
|
||||
user_height,
|
||||
NULL, NULL, NULL, data);
|
||||
free(title_wide);
|
||||
if (!main_window.hwnd)
|
||||
return false;
|
||||
|
||||
|
@ -116,7 +116,9 @@ static void ui_window_win32_set_visible(void *data,
|
||||
static void ui_window_win32_set_title(void *data, char *buf)
|
||||
{
|
||||
ui_window_win32_t *window = (ui_window_win32_t*)data;
|
||||
SetWindowText(window->hwnd, buf);
|
||||
wchar_t *title_wide = utf8_to_utf16_string_alloc(buf);
|
||||
SetWindowTextW(window->hwnd, title_wide);
|
||||
free(title_wide);
|
||||
}
|
||||
|
||||
void ui_window_win32_set_droppable(void *data, bool droppable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user