diff --git a/src/SDL_assert.c b/src/SDL_assert.c index bee07a9ed..355637db9 100644 --- a/src/SDL_assert.c +++ b/src/SDL_assert.c @@ -120,13 +120,13 @@ static void SDL_GenerateAssertionReport(void) } -static SDL_NORETURN void SDL_ExitProcess(int exitcode) +static void SDL_ExitProcess(int exitcode) { #ifdef __WIN32__ - /* "if you do not know the state of all threads in your process, it is - better to call TerminateProcess than ExitProcess" - https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */ - TerminateProcess(GetCurrentProcess(), exitcode); + /* "if you do not know the state of all threads in your process, it is + better to call TerminateProcess than ExitProcess" + https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */ + TerminateProcess(GetCurrentProcess(), exitcode); #elif defined(__EMSCRIPTEN__) emscripten_cancel_main_loop(); /* this should "kill" the app. */ @@ -138,7 +138,7 @@ static SDL_NORETURN void SDL_ExitProcess(int exitcode) } -static SDL_NORETURN void SDL_AbortAssertion(void) +static void SDL_AbortAssertion(void) { SDL_Quit(); SDL_ExitProcess(42); diff --git a/src/video/windows/SDL_windowsmessagebox.c b/src/video/windows/SDL_windowsmessagebox.c index ce6813f59..a81f9cf09 100644 --- a/src/video/windows/SDL_windowsmessagebox.c +++ b/src/video/windows/SDL_windowsmessagebox.c @@ -560,6 +560,7 @@ WIN_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) TaskConfig.cButtons = messageboxdata->numbuttons; pButtons = SDL_malloc(sizeof (TASKDIALOG_BUTTON) * messageboxdata->numbuttons); TaskConfig.nDefaultButton = 0; + nCancelButton = 0; for (i = 0; i < messageboxdata->numbuttons; i++) { pButton = &pButtons[messageboxdata->numbuttons-1-i]; diff --git a/src/video/windows/SDL_windowstaskdialog.h b/src/video/windows/SDL_windowstaskdialog.h index 2d999b78c..549ab260e 100644 --- a/src/video/windows/SDL_windowstaskdialog.h +++ b/src/video/windows/SDL_windowstaskdialog.h @@ -20,7 +20,7 @@ */ #include -typedef HRESULT(CALLBACK *PFTASKDIALOGCALLBACK)(_In_ HWND hwnd, _In_ UINT msg, _In_ WPARAM wParam, _In_ LPARAM lParam, _In_ LONG_PTR lpRefData); +typedef HRESULT(CALLBACK *PFTASKDIALOGCALLBACK)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LONG_PTR lpRefData); enum _TASKDIALOG_FLAGS {