mirror of
https://github.com/holub/mame
synced 2025-06-28 23:24:23 +03:00
Fixed create_window_class
First, try to unregister previously registered class.
This commit is contained in:
parent
ee826f16cb
commit
d7cf28647a
@ -892,6 +892,8 @@ static void create_window_class(void)
|
|||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2));
|
||||||
|
|
||||||
|
UnregisterClass(wc.lpszClassName, wc.hInstance);
|
||||||
|
|
||||||
// register the class; fail if we can't
|
// register the class; fail if we can't
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
fatalerror("Failed to create window class\n");
|
fatalerror("Failed to create window class\n");
|
||||||
@ -1393,7 +1395,7 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return DefWindowProc(wnd, message, wparam, lparam);
|
return DefWindowProc(wnd, message, wparam, lparam);
|
||||||
}
|
}c
|
||||||
|
|
||||||
// track whether we are in the foreground
|
// track whether we are in the foreground
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
|
Loading…
Reference in New Issue
Block a user