diff --git a/source/lib/sysdep/os/win/wsdl.cpp b/source/lib/sysdep/os/win/wsdl.cpp index 18dfd9677e..5cd2faf0cc 100644 --- a/source/lib/sysdep/os/win/wsdl.cpp +++ b/source/lib/sysdep/os/win/wsdl.cpp @@ -417,6 +417,9 @@ static void video_Shutdown() WARN_IF_FALSE(wglDeleteContext(hGLRC)); hGLRC = (HGLRC)INVALID_HANDLE_VALUE; } + + g_hWnd = (HWND)INVALID_HANDLE_VALUE; + g_hDC = (HDC)INVALID_HANDLE_VALUE; } @@ -460,15 +463,11 @@ static Queue g_queue; static void QueueEvent(const SDL_Event& ev) { - debug_assert(!is_quitting); - g_queue.push(ev); } static bool DequeueEvent(SDL_Event& ev) { - debug_assert(!is_quitting); - if(g_queue.empty()) return false; ev = g_queue.front(); diff --git a/source/lib/sysdep/os/win/wsysdep.cpp b/source/lib/sysdep/os/win/wsysdep.cpp index 0587ac5434..a3a7f0376f 100644 --- a/source/lib/sysdep/os/win/wsysdep.cpp +++ b/source/lib/sysdep/os/win/wsysdep.cpp @@ -29,6 +29,7 @@ #include "lib/sysdep/os/win/win.h" // includes windows.h; must come before shlobj #include // pick_dir +#include // open_url #include #include "lib/sysdep/clipboard.h" @@ -415,8 +416,8 @@ LibError sys_pick_directory(fs::wpath& path) LibError sys_open_url(const std::string& url) { - LONG r = ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL); - if (r > 32) + HINSTANCE r = ShellExecuteA(NULL, "open", url.c_str(), NULL, NULL, SW_SHOWNORMAL); + if ((int)r > 32) return INFO::OK; WARN_RETURN(ERR::FAIL); diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 5d1e6ffb05..fd4653813e 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -565,7 +565,7 @@ static void InitSDL() static void ShutdownSDL() { - SDL_QuitSubSystem(SDL_INIT_VIDEO|SDL_INIT_TIMER); + SDL_Quit(); sys_cursor_reset(); } diff --git a/source/ps/tests/stub_impl_hack.h b/source/ps/tests/stub_impl_hack.h index adeb2671b0..28b47e64d1 100644 --- a/source/ps/tests/stub_impl_hack.h +++ b/source/ps/tests/stub_impl_hack.h @@ -23,6 +23,10 @@ void kill_mainloop() { } +void restart_mainloop_in_atlas() +{ +} + // just so that cxxtestgen doesn't complain "No tests defined" class TestDummy : public CxxTest::TestSuite {