Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

WinRT: fixed bug whereby attempting to create a 2nd window (which int…

…entionall fails, for now) would cause mouse input to stop working
  • Loading branch information
DavidLudwig committed Oct 30, 2012
1 parent 13c72d0 commit 5d2d074ee2c8dd1d67ca2f5bc0523912d0ca9078
@@ -198,6 +198,11 @@ SDL_DisplayMode SDL_WinRTApp::GetMainDisplayMode()
return mode;
}

const SDL_WindowData * SDL_WinRTApp::GetSDLWindowData() const
{
return m_sdlWindowData;
}

bool SDL_WinRTApp::HasSDLWindowData() const
{
return (m_sdlWindowData != NULL);
@@ -23,8 +23,9 @@ ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFramewo
// SDL-specific methods
SDL_DisplayMode GetMainDisplayMode();
void PumpEvents();
const SDL_WindowData * GetSDLWindowData() const;
bool HasSDLWindowData() const;
void SetSDLWindowData(const SDL_WindowData* windowData);
void SetSDLWindowData(const SDL_WindowData * windowData);

protected:
// Event Handlers.
@@ -168,7 +168,8 @@ WINRT_CreateWindow(_THIS, SDL_Window * window)
void
WINRT_DestroyWindow(_THIS, SDL_Window * window)
{
if (SDL_WinRTGlobalApp->HasSDLWindowData())
if (SDL_WinRTGlobalApp->HasSDLWindowData() &&
SDL_WinRTGlobalApp->GetSDLWindowData()->sdlWindow == window)
{
SDL_WinRTGlobalApp->SetSDLWindowData(NULL);
}

0 comments on commit 5d2d074

Please sign in to comment.