summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/windows/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/windows/window.c')
-rw-r--r--src/osd/windows/window.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c
index 1bb225f3e0b..3c25e8e9ca5 100644
--- a/src/osd/windows/window.c
+++ b/src/osd/windows/window.c
@@ -35,6 +35,8 @@
#include "config.h"
#include "winutf8.h"
+#include "winutil.h"
+
extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks);
extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks);
extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks);
@@ -885,11 +887,13 @@ static void create_window_class(void)
// initialize the description of the window class
wc.lpszClassName = TEXT("MAME");
- wc.hInstance = GetModuleHandle(NULL);
+ wc.hInstance = GetModuleHandleUni();
wc.lpfnWndProc = winwindow_video_window_proc_ui;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
+ UnregisterClass(wc.lpszClassName, wc.hInstance);
+
// register the class; fail if we can't
if (!RegisterClass(&wc))
fatalerror("Failed to create window class\n");
@@ -1191,7 +1195,7 @@ int win_window_info::complete_create()
monitorbounds.left() + 100, monitorbounds.top() + 100,
NULL,//(win_window_list != NULL) ? win_window_list->m_hwnd : NULL,
menu,
- GetModuleHandle(NULL),
+ GetModuleHandleUni(),
NULL);
if (m_hwnd == NULL)
return 1;