mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- let the "abort" button on the network pane of the startup screen do a hard exit on Windows.
This merely posted a quit message which did not get properly processed and let the game run into other code with incompletely set up data.
This commit is contained in:
parent
67127e4cce
commit
124d71a7be
1 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "utf8.h"
|
||||
#include "v_font.h"
|
||||
#include "i_net.h"
|
||||
#include "engineerrors.h"
|
||||
#include <richedit.h>
|
||||
#include <shellapi.h>
|
||||
#include <commctrl.h>
|
||||
|
@ -264,7 +265,7 @@ static INT_PTR CALLBACK NetStartPaneProc(HWND hDlg, UINT msg, WPARAM wParam, LPA
|
|||
{
|
||||
if (msg == WM_COMMAND && HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
PostQuitMessage(0);
|
||||
PostMessage(hDlg, WM_COMMAND, 1337, 1337);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -357,6 +358,11 @@ bool MainWindow::RunMessageLoop(bool (*timer_callback)(void*), void* userdata)
|
|||
}
|
||||
else
|
||||
{
|
||||
// This must be outside the window function so that the exception does not cross DLL boundaries.
|
||||
if (msg.message == WM_COMMAND && msg.wParam == 1337 && msg.lParam == 1337)
|
||||
{
|
||||
throw CExitEvent(0);
|
||||
}
|
||||
if (msg.message == WM_TIMER && msg.hwnd == Window && msg.wParam == 1337)
|
||||
{
|
||||
if (timer_callback(userdata))
|
||||
|
|
Loading…
Reference in a new issue