Windows fixes

This was SVN commit r7715.
This commit is contained in:
Ykkrosh 2010-07-07 22:23:18 +00:00
parent 4b06ebd52d
commit 88f25849b3
4 changed files with 11 additions and 7 deletions

View File

@ -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();

View File

@ -29,6 +29,7 @@
#include "lib/sysdep/os/win/win.h" // includes windows.h; must come before shlobj
#include <shlobj.h> // pick_dir
#include <shellapi.h> // open_url
#include <Wincrypt.h>
#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);

View File

@ -565,7 +565,7 @@ static void InitSDL()
static void ShutdownSDL()
{
SDL_QuitSubSystem(SDL_INIT_VIDEO|SDL_INIT_TIMER);
SDL_Quit();
sys_cursor_reset();
}

View File

@ -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
{