From e4eef4a1b27f669d195a32d484e4c10ac22c9610 Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Tue, 11 May 2021 00:00:34 +0300 Subject: [PATCH] Move cpu_override warning dialog after main window is created so that manager gets the correct window handle. --- src/win/win_ui.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/win/win_ui.c b/src/win/win_ui.c index cce913b00..002cb270d 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -1339,11 +1339,6 @@ ui_init(int nCmdShow) } #endif - /* Warn the user about unsupported configs. */ - if (cpu_override && ui_msgbox_ex(MBX_WARNING | MBX_QUESTION_OK, (void *) IDS_2145, (void *) IDS_2146, (void *) IDS_2147, (void *) IDS_2119, NULL)) { - return(0); - } - /* Create our main window's class and register it. */ wincl.hInstance = hinstance; wincl.lpszClassName = CLASS_NAME; @@ -1438,6 +1433,13 @@ ui_init(int nCmdShow) /* Make the window visible on the screen. */ ShowWindow(hwnd, nCmdShow); + /* Warn the user about unsupported configs. */ + if (cpu_override && ui_msgbox_ex(MBX_WARNING | MBX_QUESTION_OK, (void*)IDS_2145, (void*)IDS_2146, (void*)IDS_2147, (void*)IDS_2119, NULL)) + { + DestroyWindow(hwnd); + return(0); + } + GetClipCursor(&oldclip); /* Initialize the RawInput (keyboard) module. */