[win] Remove the close window confirmation dialog

It's annoying and unless there's data to save (not at this stage, at
least), rather unnecessary.
This commit is contained in:
Bill Currie 2023-11-25 22:01:03 +09:00
parent c110119196
commit 0774f70ca2

View file

@ -1077,22 +1077,12 @@ event_mousewheel (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return 0;
}
static LONG
event_close (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (MessageBox (win_mainwindow,
"Are you sure you want to quit?", "Confirm Exit",
MB_YESNO | MB_SETFOREGROUND | MB_ICONQUESTION) == IDYES) {
Sys_Quit ();
}
return 0;
}
static long
event_activate (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
int fActive = LOWORD (wParam);
int fMinimized = (BOOL) HIWORD (wParam);
Win_Activate (!(fActive == WA_INACTIVE), fMinimized);
// fix leftover Alt from any Alt-Tab or the like that switched us away
if (in_win_initialized) {
@ -1128,8 +1118,6 @@ IN_Win_Preinit (void)
Win_AddEvent (WM_MOUSEWHEEL, event_mousewheel);
Win_AddEvent (WM_CLOSE, event_close);
Win_AddEvent (WM_ACTIVATE, event_activate);
}