WM_SHUTDOWN now no longer asks for confirmation if WPARAM == 1.

This commit is contained in:
OBattler
2022-02-12 01:01:17 +01:00
parent 9cb385454c
commit 3c0d6ab2cc

View File

@@ -1012,6 +1012,13 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_SHUTDOWN: case WM_SHUTDOWN:
if (manager_wm) if (manager_wm)
break; break;
if (LOWORD(wParam) == 1) {
confirm_exit = 0;
nvr_save();
config_save();
KillTimer(hwnd, TIMER_1SEC);
PostQuitMessage(0);
} else {
win_notify_dlg_open(); win_notify_dlg_open();
if (confirm_exit && confirm_exit_cmdl) if (confirm_exit && confirm_exit_cmdl)
i = ui_msgbox_ex(MBX_QUESTION_YN | MBX_DONTASK, (wchar_t *) IDS_2113, NULL, (wchar_t *) IDS_2119, (wchar_t *) IDS_2136, NULL); i = ui_msgbox_ex(MBX_QUESTION_YN | MBX_DONTASK, (wchar_t *) IDS_2113, NULL, (wchar_t *) IDS_2119, (wchar_t *) IDS_2136, NULL);
@@ -1027,6 +1034,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
PostQuitMessage(0); PostQuitMessage(0);
} }
win_notify_dlg_closed(); win_notify_dlg_closed();
}
break; break;
case WM_CTRLALTDEL: case WM_CTRLALTDEL: