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,21 +1012,29 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_SHUTDOWN:
if (manager_wm)
break;
win_notify_dlg_open();
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);
else
i = 0;
if ((i % 10) == 0) {
if (i == 10) {
confirm_exit = 0;
nvr_save();
config_save();
}
if (LOWORD(wParam) == 1) {
confirm_exit = 0;
nvr_save();
config_save();
KillTimer(hwnd, TIMER_1SEC);
PostQuitMessage(0);
} else {
win_notify_dlg_open();
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);
else
i = 0;
if ((i % 10) == 0) {
if (i == 10) {
confirm_exit = 0;
nvr_save();
config_save();
}
KillTimer(hwnd, TIMER_1SEC);
PostQuitMessage(0);
}
win_notify_dlg_closed();
}
win_notify_dlg_closed();
break;
case WM_CTRLALTDEL: