mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Co-authored-by: Soar Qin <soarchin@gmial.com>
This commit is contained in:
parent
e9d4fcc00c
commit
290bc214e3
@ -1615,22 +1615,31 @@ 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));
|
||||
#ifdef LEGACY_WIN32
|
||||
char *title_local = utf8_to_local_string_alloc(new_label2);
|
||||
#else
|
||||
wchar_t *title_local = utf8_to_utf16_string_alloc(msg_hash_to_str(MSG_PROGRAM));
|
||||
#endif
|
||||
|
||||
if (window_save_positions && !fullscreen)
|
||||
{
|
||||
user_width = g_win32->pos_width;
|
||||
user_height = g_win32->pos_height;
|
||||
}
|
||||
#ifdef LEGACY_WIN32
|
||||
main_window.hwnd = CreateWindowEx(0,
|
||||
"RetroArch", title_local,
|
||||
#else
|
||||
main_window.hwnd = CreateWindowExW(0,
|
||||
L"RetroArch", title_wide,
|
||||
L"RetroArch", title_local,
|
||||
#endif
|
||||
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);
|
||||
free(title_local);
|
||||
if (!main_window.hwnd)
|
||||
return false;
|
||||
|
||||
|
@ -116,9 +116,14 @@ 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;
|
||||
wchar_t *title_wide = utf8_to_utf16_string_alloc(buf);
|
||||
SetWindowTextW(window->hwnd, title_wide);
|
||||
free(title_wide);
|
||||
#ifdef LEGACY_WIN32
|
||||
char *title_local = utf8_to_local_string_alloc(new_label2);
|
||||
SetWindowText(window->hwnd, title_local);
|
||||
#else
|
||||
wchar_t *title_local = utf8_to_utf16_string_alloc(buf);
|
||||
SetWindowTextW(window->hwnd, title_local);
|
||||
#endif
|
||||
free(title_local);
|
||||
}
|
||||
|
||||
void ui_window_win32_set_droppable(void *data, bool droppable)
|
||||
|
Loading…
x
Reference in New Issue
Block a user