WinRT: made SDL_PumpEvents() work, in theory
authorDavid Ludwig <dludwig@pobox.com>
Sun, 28 Oct 2012 20:04:26 -0400
changeset 8331737dc8a4f49f
parent 8330 d976f30d38e9
child 8332 ea83d191cc17
WinRT: made SDL_PumpEvents() work, in theory
VisualC/SDL/SDL_VS2012_WinRT.vcxproj
src/video/windowsrt/SDL_WinRTApp.cpp
src/video/windowsrt/SDL_WinRTApp.h
src/video/windowsrt/SDL_winrtevents.cpp
     1.1 --- a/VisualC/SDL/SDL_VS2012_WinRT.vcxproj	Sun Oct 28 19:47:33 2012 -0400
     1.2 +++ b/VisualC/SDL/SDL_VS2012_WinRT.vcxproj	Sun Oct 28 20:04:26 2012 -0400
     1.3 @@ -125,7 +125,14 @@
     1.4        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
     1.5        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
     1.6      </ClCompile>
     1.7 -    <ClCompile Include="..\..\src\video\windowsrt\SDL_winrtevents.cpp" />
     1.8 +    <ClCompile Include="..\..\src\video\windowsrt\SDL_winrtevents.cpp">
     1.9 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
    1.10 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</CompileAsWinRT>
    1.11 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</CompileAsWinRT>
    1.12 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</CompileAsWinRT>
    1.13 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</CompileAsWinRT>
    1.14 +      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</CompileAsWinRT>
    1.15 +    </ClCompile>
    1.16      <ClCompile Include="..\..\src\video\windowsrt\SDL_winrtframebuffer.cpp" />
    1.17      <ClCompile Include="..\..\src\video\windowsrt\SDL_winrtvideo.cpp">
    1.18        <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</CompileAsWinRT>
     2.1 --- a/src/video/windowsrt/SDL_WinRTApp.cpp	Sun Oct 28 19:47:33 2012 -0400
     2.2 +++ b/src/video/windowsrt/SDL_WinRTApp.cpp	Sun Oct 28 20:04:26 2012 -0400
     2.3 @@ -88,8 +88,11 @@
     2.4          char **argv = NULL;
     2.5          SDL_WinRT_main(argc, argv);
     2.6      }
     2.7 +}
     2.8  
     2.9 -	while (!m_windowClosed)
    2.10 +void SDL_WinRTApp::PumpEvents()
    2.11 +{
    2.12 +	if (!m_windowClosed)
    2.13  	{
    2.14  		if (m_windowVisible)
    2.15  		{
     3.1 --- a/src/video/windowsrt/SDL_WinRTApp.h	Sun Oct 28 19:47:33 2012 -0400
     3.2 +++ b/src/video/windowsrt/SDL_WinRTApp.h	Sun Oct 28 20:04:26 2012 -0400
     3.3 @@ -21,6 +21,7 @@
     3.4  internal:
     3.5      // SDL-specific methods
     3.6      SDL_DisplayMode GetMainDisplayMode();
     3.7 +    void PumpEvents();
     3.8  
     3.9  protected:
    3.10  	// Event Handlers.
     4.1 --- a/src/video/windowsrt/SDL_winrtevents.cpp	Sun Oct 28 19:47:33 2012 -0400
     4.2 +++ b/src/video/windowsrt/SDL_winrtevents.cpp	Sun Oct 28 20:04:26 2012 -0400
     4.3 @@ -22,18 +22,18 @@
     4.4  
     4.5  #if SDL_VIDEO_DRIVER_WINRT
     4.6  
     4.7 -/* Being a null driver, there's no event stream. We just define stubs for
     4.8 -   most of the API. */
     4.9 -
    4.10  #include "../../events/SDL_events_c.h"
    4.11  
    4.12  #include "SDL_winrtvideo.h"
    4.13  #include "SDL_winrtevents_c.h"
    4.14 +#include "SDL_WinRTApp.h"
    4.15 +
    4.16 +extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;
    4.17  
    4.18  void
    4.19  WINRT_PumpEvents(_THIS)
    4.20  {
    4.21 -    /* do nothing. */
    4.22 +    SDL_WinRTGlobalApp->PumpEvents();
    4.23  }
    4.24  
    4.25  #endif /* SDL_VIDEO_DRIVER_WINRT */