Properly dehardcode program name now

This commit is contained in:
twinaphex 2019-07-19 20:08:45 +02:00
parent eebfa11528
commit b747bb22f4
2 changed files with 4 additions and 3 deletions

View File

@ -1000,7 +1000,7 @@ bool win32_window_create(void *data, unsigned style,
user_height= g_win32_pos_height;
}
main_window.hwnd = CreateWindowEx(0,
"RetroArch", "RetroArch",
msg_hash_to_str(MSG_PROGRAM), msg_hash_to_str(MSG_PROGRAM),
style,
fullscreen ? mon_rect->left : g_win32_pos_x,
fullscreen ? mon_rect->top : g_win32_pos_y,
@ -1441,7 +1441,8 @@ void win32_window_reset(void)
void win32_destroy_window(void)
{
#ifndef _XBOX
UnregisterClass("RetroArch", GetModuleHandle(NULL));
UnregisterClass(msg_hash_to_str(MSG_PROGRAM),
GetModuleHandle(NULL));
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */
UnregisterDeviceNotification(notification_handler);
#endif

View File

@ -64,7 +64,7 @@ bool win32_window_init(WNDCLASSEX *wndclass,
wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wndclass->hInstance = GetModuleHandle(NULL);
wndclass->hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass->lpszClassName = (class_name != NULL) ? class_name : "RetroArch";
wndclass->lpszClassName = (class_name != NULL) ? class_name : msg_hash_to_str(MSG_PROGRAM);
wndclass->hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON));
wndclass->hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0);