Fixed create_window_class

First, try to unregister previously registered class.
This commit is contained in:
Vladimir Kryvian 2015-08-27 14:10:21 +03:00
parent ee826f16cb
commit d7cf28647a

View File

@ -892,6 +892,8 @@ static void create_window_class(void)
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");
@ -1393,7 +1395,7 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR
break;
}
return DefWindowProc(wnd, message, wparam, lparam);
}
}c
// track whether we are in the foreground
case WM_ACTIVATEAPP: