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

WinRT: made SDL_PumpEvents() work, in theory

  • Loading branch information
DavidLudwig committed Oct 29, 2012
1 parent b26d4f9 commit 6720dba0f95fc6929201e80fdcb64c825eefe148
@@ -125,7 +125,14 @@
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\src\video\windowsrt\SDL_winrtevents.cpp" />
<ClCompile Include="..\..\src\video\windowsrt\SDL_winrtevents.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
</ClCompile>
<ClCompile Include="..\..\src\video\windowsrt\SDL_winrtframebuffer.cpp" />
<ClCompile Include="..\..\src\video\windowsrt\SDL_winrtvideo.cpp">
<CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
@@ -88,8 +88,11 @@ void SDL_WinRTApp::Run()
char **argv = NULL;
SDL_WinRT_main(argc, argv);
}
}

while (!m_windowClosed)
void SDL_WinRTApp::PumpEvents()
{
if (!m_windowClosed)
{
if (m_windowVisible)
{
@@ -21,6 +21,7 @@ ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFramewo
internal:
// SDL-specific methods
SDL_DisplayMode GetMainDisplayMode();
void PumpEvents();

protected:
// Event Handlers.
@@ -22,18 +22,18 @@

#if SDL_VIDEO_DRIVER_WINRT

/* Being a null driver, there's no event stream. We just define stubs for
most of the API. */

#include "../../events/SDL_events_c.h"

#include "SDL_winrtvideo.h"
#include "SDL_winrtevents_c.h"
#include "SDL_WinRTApp.h"

extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;

void
WINRT_PumpEvents(_THIS)
{
/* do nothing. */
SDL_WinRTGlobalApp->PumpEvents();
}

#endif /* SDL_VIDEO_DRIVER_WINRT */

0 comments on commit 6720dba

Please sign in to comment.