From d7cf28647acc9eb241aa04f13a2a71ecfe83e018 Mon Sep 17 00:00:00 2001 From: Vladimir Kryvian Date: Thu, 27 Aug 2015 14:10:21 +0300 Subject: [PATCH] Fixed create_window_class First, try to unregister previously registered class. --- src/osd/windows/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index a16a39286b8..1c11e960c4e 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -891,6 +891,8 @@ static void create_window_class(void) 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)) @@ -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: