WinRT: misc code cleanups
authorDavid Ludwig
Tue, 27 Aug 2013 11:39:44 -0400
changeset 84945d165785918d
parent 8493 b0e7b54c356c
child 8495 7ab2ba12db6b
WinRT: misc code cleanups
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters
src/core/winrt/SDL_winrtapp.cpp
src/core/winrt/SDL_winrtapp.h
src/video/winrt/SDL_winrtevents.cpp
src/video/winrt/SDL_winrtevents_c.h
src/video/winrt/SDL_winrtkeyboard.cpp
src/video/winrt/SDL_winrtvideo.cpp
src/video/winrt/SDL_winrtvideo.h
     1.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Tue Aug 27 11:00:52 2013 -0400
     1.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Tue Aug 27 11:39:44 2013 -0400
     1.3 @@ -286,7 +286,6 @@
     1.4      <ClInclude Include="..\..\src\video\SDL_sysvideo.h" />
     1.5      <ClInclude Include="..\..\src\video\winrt\SDL_winrtevents_c.h" />
     1.6      <ClInclude Include="..\..\src\video\winrt\SDL_winrtmouse.h" />
     1.7 -    <ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo.h" />
     1.8    </ItemGroup>
     1.9    <ItemGroup>
    1.10      <FxCompile Include="..\..\src\render\direct3d11\SDL_D3D11_PixelShader_FixedColor.hlsl">
     2.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Tue Aug 27 11:00:52 2013 -0400
     2.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Tue Aug 27 11:39:44 2013 -0400
     2.3 @@ -593,9 +593,6 @@
     2.4      <ClInclude Include="..\..\src\video\winrt\SDL_winrtmouse.h">
     2.5        <Filter>Source Files</Filter>
     2.6      </ClInclude>
     2.7 -    <ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo.h">
     2.8 -      <Filter>Source Files</Filter>
     2.9 -    </ClInclude>
    2.10      <ClInclude Include="..\..\src\core\winrt\SDL_winrtapp.h">
    2.11        <Filter>Source Files</Filter>
    2.12      </ClInclude>
     3.1 --- a/src/core/winrt/SDL_winrtapp.cpp	Tue Aug 27 11:00:52 2013 -0400
     3.2 +++ b/src/core/winrt/SDL_winrtapp.cpp	Tue Aug 27 11:39:44 2013 -0400
     3.3 @@ -1,10 +1,26 @@
     3.4  
     3.5 +/* Standard C++11 includes */
     3.6  #include <functional>
     3.7  #include <string>
     3.8  #include <sstream>
     3.9 +using namespace std;
    3.10  
    3.11 +
    3.12 +/* Windows includes */
    3.13  #include "ppltasks.h"
    3.14 +using namespace concurrency;
    3.15 +using namespace Windows::ApplicationModel;
    3.16 +using namespace Windows::ApplicationModel::Core;
    3.17 +using namespace Windows::ApplicationModel::Activation;
    3.18 +using namespace Windows::Devices::Input;
    3.19 +using namespace Windows::Graphics::Display;
    3.20 +using namespace Windows::Foundation;
    3.21 +using namespace Windows::System;
    3.22 +using namespace Windows::UI::Core;
    3.23 +using namespace Windows::UI::Input;
    3.24  
    3.25 +
    3.26 +/* SDL includes */
    3.27  extern "C" {
    3.28  #include "SDL_assert.h"
    3.29  #include "SDL_events.h"
    3.30 @@ -21,20 +37,8 @@
    3.31  }
    3.32  
    3.33  #include "../../video/winrt/SDL_winrtevents_c.h"
    3.34 -#include "../../video/winrt/SDL_winrtvideo.h"
    3.35  #include "SDL_winrtapp.h"
    3.36  
    3.37 -using namespace concurrency;
    3.38 -using namespace std;
    3.39 -using namespace Windows::ApplicationModel;
    3.40 -using namespace Windows::ApplicationModel::Core;
    3.41 -using namespace Windows::ApplicationModel::Activation;
    3.42 -using namespace Windows::Devices::Input;
    3.43 -using namespace Windows::Graphics::Display;
    3.44 -using namespace Windows::Foundation;
    3.45 -using namespace Windows::System;
    3.46 -using namespace Windows::UI::Core;
    3.47 -using namespace Windows::UI::Input;
    3.48  
    3.49  // Compile-time debugging options:
    3.50  // To enable, uncomment; to disable, comment them out.
    3.51 @@ -140,7 +144,7 @@
    3.52  SDL_WinRTApp::SDL_WinRTApp() :
    3.53      m_windowClosed(false),
    3.54      m_windowVisible(true),
    3.55 -    m_sdlWindowData(NULL),
    3.56 +    m_sdlWindow(NULL),
    3.57      m_sdlVideoDevice(NULL)
    3.58  {
    3.59  }
    3.60 @@ -279,16 +283,16 @@
    3.61  void SDL_WinRTApp::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args)
    3.62  {
    3.63  #if LOG_WINDOW_EVENTS==1
    3.64 -    SDL_Log("%s, size={%f,%f}, current orientation=%d, native orientation=%d, auto rot. pref=%d, m_sdlWindowData?=%s\n",
    3.65 +    SDL_Log("%s, size={%f,%f}, current orientation=%d, native orientation=%d, auto rot. pref=%d, m_sdlWindow?=%s\n",
    3.66          __FUNCTION__,
    3.67          args->Size.Width, args->Size.Height,
    3.68          (int)DisplayProperties::CurrentOrientation,
    3.69          (int)DisplayProperties::NativeOrientation,
    3.70          (int)DisplayProperties::AutoRotationPreferences,
    3.71 -        (m_sdlWindowData ? "yes" : "no"));
    3.72 +        (m_sdlWindow ? "yes" : "no"));
    3.73  #endif
    3.74  
    3.75 -    if (m_sdlWindowData) {
    3.76 +    if (m_sdlWindow) {
    3.77          // Make the new window size be the one true fullscreen mode.
    3.78          // This change was initially done, in part, to allow the Direct3D 11.1
    3.79          // renderer to receive window-resize events as a device rotates.
    3.80 @@ -309,7 +313,7 @@
    3.81          const int windowWidth = (int) ceil(args->Size.Width);
    3.82          const int windowHeight = (int) ceil(args->Size.Height);
    3.83          SDL_SendWindowEvent(
    3.84 -            m_sdlWindowData->sdlWindow,
    3.85 +            m_sdlWindow,
    3.86              SDL_WINDOWEVENT_RESIZED,
    3.87              windowWidth,
    3.88              windowHeight);
    3.89 @@ -319,20 +323,20 @@
    3.90  void SDL_WinRTApp::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args)
    3.91  {
    3.92  #if LOG_WINDOW_EVENTS==1
    3.93 -    SDL_Log("%s, visible?=%s, m_sdlWindowData?=%s\n",
    3.94 +    SDL_Log("%s, visible?=%s, m_sdlWindow?=%s\n",
    3.95          __FUNCTION__,
    3.96          (args->Visible ? "yes" : "no"),
    3.97 -        (m_sdlWindowData ? "yes" : "no"));
    3.98 +        (m_sdlWindow ? "yes" : "no"));
    3.99  #endif
   3.100  
   3.101      m_windowVisible = args->Visible;
   3.102 -    if (m_sdlWindowData) {
   3.103 -        SDL_bool wasSDLWindowSurfaceValid = m_sdlWindowData->sdlWindow->surface_valid;
   3.104 +    if (m_sdlWindow) {
   3.105 +        SDL_bool wasSDLWindowSurfaceValid = m_sdlWindow->surface_valid;
   3.106  
   3.107          if (args->Visible) {
   3.108 -            SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_SHOWN, 0, 0);
   3.109 +            SDL_SendWindowEvent(m_sdlWindow, SDL_WINDOWEVENT_SHOWN, 0, 0);
   3.110          } else {
   3.111 -            SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_HIDDEN, 0, 0);
   3.112 +            SDL_SendWindowEvent(m_sdlWindow, SDL_WINDOWEVENT_HIDDEN, 0, 0);
   3.113          }
   3.114  
   3.115          // HACK: Prevent SDL's window-hide handling code, which currently
   3.116 @@ -341,7 +345,7 @@
   3.117          //
   3.118          // A better solution to this probably involves figuring out if the
   3.119          // fake window resize can be prevented.
   3.120 -        m_sdlWindowData->sdlWindow->surface_valid = wasSDLWindowSurfaceValid;
   3.121 +        m_sdlWindow->surface_valid = wasSDLWindowSurfaceValid;
   3.122      }
   3.123  }
   3.124  
   3.125 @@ -355,32 +359,27 @@
   3.126  
   3.127  void SDL_WinRTApp::OnPointerPressed(CoreWindow^ sender, PointerEventArgs^ args)
   3.128  {
   3.129 -    SDL_Window * window = (m_sdlWindowData ? m_sdlWindowData->sdlWindow : nullptr);
   3.130 -    WINRT_ProcessPointerPressedEvent(window, args);
   3.131 +    WINRT_ProcessPointerPressedEvent(m_sdlWindow, args);
   3.132  }
   3.133  
   3.134  void SDL_WinRTApp::OnPointerReleased(CoreWindow^ sender, PointerEventArgs^ args)
   3.135  {
   3.136 -    SDL_Window * window = (m_sdlWindowData ? m_sdlWindowData->sdlWindow : nullptr);
   3.137 -    WINRT_ProcessPointerReleasedEvent(window, args);
   3.138 +    WINRT_ProcessPointerReleasedEvent(m_sdlWindow, args);
   3.139  }
   3.140  
   3.141  void SDL_WinRTApp::OnPointerWheelChanged(CoreWindow^ sender, PointerEventArgs^ args)
   3.142  {
   3.143 -    SDL_Window * window = (m_sdlWindowData ? m_sdlWindowData->sdlWindow : nullptr);
   3.144 -    WINRT_ProcessPointerWheelChangedEvent(window, args);
   3.145 +    WINRT_ProcessPointerWheelChangedEvent(m_sdlWindow, args);
   3.146  }
   3.147  
   3.148  void SDL_WinRTApp::OnMouseMoved(MouseDevice^ mouseDevice, MouseEventArgs^ args)
   3.149  {
   3.150 -    SDL_Window * window = (m_sdlWindowData ? m_sdlWindowData->sdlWindow : nullptr);
   3.151 -    WINRT_ProcessMouseMovedEvent(window, args);
   3.152 +    WINRT_ProcessMouseMovedEvent(m_sdlWindow, args);
   3.153  }
   3.154  
   3.155  void SDL_WinRTApp::OnPointerMoved(CoreWindow^ sender, PointerEventArgs^ args)
   3.156  {
   3.157 -    SDL_Window * window = (m_sdlWindowData ? m_sdlWindowData->sdlWindow : nullptr);
   3.158 -    WINRT_ProcessPointerMovedEvent(window, args);
   3.159 +    WINRT_ProcessPointerMovedEvent(m_sdlWindow, args);
   3.160  }
   3.161  
   3.162  void SDL_WinRTApp::OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args)
   3.163 @@ -439,9 +438,9 @@
   3.164          // first via a callback passed to SDL_AddEventWatch, and second via
   3.165          // SDL's event queue, the event will be sent to SDL, then immediately
   3.166          // removed from the queue.
   3.167 -        if (m_sdlWindowData)
   3.168 +        if (m_sdlWindow)
   3.169          {
   3.170 -            SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_MINIMIZED, 0, 0);   // TODO: see if SDL_WINDOWEVENT_SIZE_CHANGED should be getting triggered here (it is, currently)
   3.171 +            SDL_SendWindowEvent(m_sdlWindow, SDL_WINDOWEVENT_MINIMIZED, 0, 0);   // TODO: see if SDL_WINDOWEVENT_SIZE_CHANGED should be getting triggered here (it is, currently)
   3.172              SDL_FilterEvents(RemoveAppSuspendAndResumeEvents, 0);
   3.173          }
   3.174          deferral->Complete();
   3.175 @@ -453,9 +452,9 @@
   3.176      // Restore any data or state that was unloaded on suspend. By default, data
   3.177      // and state are persisted when resuming from suspend. Note that this event
   3.178      // does not occur if the app was previously terminated.
   3.179 -    if (m_sdlWindowData)
   3.180 +    if (m_sdlWindow)
   3.181      {
   3.182 -        SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_RESTORED, 0, 0);    // TODO: see if SDL_WINDOWEVENT_SIZE_CHANGED should be getting triggered here (it is, currently)
   3.183 +        SDL_SendWindowEvent(m_sdlWindow, SDL_WINDOWEVENT_RESTORED, 0, 0);    // TODO: see if SDL_WINDOWEVENT_SIZE_CHANGED should be getting triggered here (it is, currently)
   3.184  
   3.185          // Remove the app-resume event from the queue, as is done with the
   3.186          // app-suspend event.
   3.187 @@ -488,19 +487,14 @@
   3.188      return mode;
   3.189  }
   3.190  
   3.191 -const SDL_WindowData * SDL_WinRTApp::GetSDLWindowData() const
   3.192 +SDL_Window * SDL_WinRTApp::GetSDLWindow()
   3.193  {
   3.194 -    return m_sdlWindowData;
   3.195 +    return m_sdlWindow;
   3.196  }
   3.197  
   3.198 -bool SDL_WinRTApp::HasSDLWindowData() const
   3.199 +void SDL_WinRTApp::SetSDLWindow(SDL_Window * window)
   3.200  {
   3.201 -    return (m_sdlWindowData != NULL);
   3.202 -}
   3.203 -
   3.204 -void SDL_WinRTApp::SetSDLWindowData(const SDL_WindowData * windowData)
   3.205 -{
   3.206 -    m_sdlWindowData = windowData;
   3.207 +    m_sdlWindow = window;
   3.208  }
   3.209  
   3.210  void SDL_WinRTApp::SetSDLVideoDevice(const SDL_VideoDevice * videoDevice)
     4.1 --- a/src/core/winrt/SDL_winrtapp.h	Tue Aug 27 11:00:52 2013 -0400
     4.2 +++ b/src/core/winrt/SDL_winrtapp.h	Tue Aug 27 11:39:44 2013 -0400
     4.3 @@ -1,7 +1,5 @@
     4.4  #pragma once
     4.5  
     4.6 -struct SDL_WindowData;
     4.7 -
     4.8  ref class SDL_WinRTApp sealed : public Windows::ApplicationModel::Core::IFrameworkView
     4.9  {
    4.10  public:
    4.11 @@ -18,9 +16,8 @@
    4.12      // SDL-specific methods
    4.13      SDL_DisplayMode CalcCurrentDisplayMode();
    4.14      void PumpEvents();
    4.15 -    const SDL_WindowData * GetSDLWindowData() const;
    4.16 -    bool HasSDLWindowData() const;
    4.17 -    void SetSDLWindowData(const SDL_WindowData * windowData);
    4.18 +    SDL_Window * GetSDLWindow();
    4.19 +    void SetSDLWindow(SDL_Window * window);
    4.20      void SetSDLVideoDevice(const SDL_VideoDevice * videoDevice);
    4.21      Windows::Foundation::Point TransformCursor(Windows::Foundation::Point rawPosition);
    4.22  
    4.23 @@ -45,6 +42,6 @@
    4.24  private:
    4.25      bool m_windowClosed;
    4.26      bool m_windowVisible;
    4.27 -    const SDL_WindowData* m_sdlWindowData;
    4.28 +    SDL_Window* m_sdlWindow;
    4.29      const SDL_VideoDevice* m_sdlVideoDevice;
    4.30  };
     5.1 --- a/src/video/winrt/SDL_winrtevents.cpp	Tue Aug 27 11:00:52 2013 -0400
     5.2 +++ b/src/video/winrt/SDL_winrtevents.cpp	Tue Aug 27 11:39:44 2013 -0400
     5.3 @@ -22,14 +22,20 @@
     5.4  
     5.5  #if SDL_VIDEO_DRIVER_WINRT
     5.6  
     5.7 -#include "../../events/SDL_events_c.h"
     5.8 -
     5.9 -#include "SDL_winrtvideo.h"
    5.10 +/* SDL includes */
    5.11  #include "SDL_winrtevents_c.h"
    5.12  #include "../../core/winrt/SDL_winrtapp.h"
    5.13  
    5.14 +extern "C" {
    5.15 +#include "../SDL_sysvideo.h"
    5.16 +#include "../../events/SDL_events_c.h"
    5.17 +}
    5.18 +
    5.19  extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;
    5.20  
    5.21 +
    5.22 +/* General event-management function(s) */
    5.23 +
    5.24  void
    5.25  WINRT_PumpEvents(_THIS)
    5.26  {
     6.1 --- a/src/video/winrt/SDL_winrtevents_c.h	Tue Aug 27 11:00:52 2013 -0400
     6.2 +++ b/src/video/winrt/SDL_winrtevents_c.h	Tue Aug 27 11:39:44 2013 -0400
     6.3 @@ -19,7 +19,10 @@
     6.4    3. This notice may not be removed or altered from any source distribution.
     6.5  */
     6.6  #include "SDL_config.h"
     6.7 -#include "SDL_winrtvideo.h"
     6.8 +
     6.9 +extern "C" {
    6.10 +#include "../SDL_sysvideo.h"
    6.11 +}
    6.12  
    6.13  /*
    6.14   * Internal-use, C-style functions:
     7.1 --- a/src/video/winrt/SDL_winrtkeyboard.cpp	Tue Aug 27 11:00:52 2013 -0400
     7.2 +++ b/src/video/winrt/SDL_winrtkeyboard.cpp	Tue Aug 27 11:39:44 2013 -0400
     7.3 @@ -22,15 +22,16 @@
     7.4  
     7.5  #if SDL_VIDEO_DRIVER_WINRT
     7.6  
     7.7 -// Standard C++11 headers:
     7.8 +/* Standard C++11 includes */
     7.9  #include <unordered_map>
    7.10  
    7.11  
    7.12 -// Windows-specific headers:
    7.13 +/* Windows-specific includes */
    7.14  #include <Windows.h>
    7.15 +#include <agile.h>
    7.16  
    7.17  
    7.18 -// SDL-specific headers:
    7.19 +/* SDL-specific includes */
    7.20  #include <SDL.h>
    7.21  #include "SDL_winrtevents_c.h"
    7.22  
     8.1 --- a/src/video/winrt/SDL_winrtvideo.cpp	Tue Aug 27 11:00:52 2013 -0400
     8.2 +++ b/src/video/winrt/SDL_winrtvideo.cpp	Tue Aug 27 11:39:44 2013 -0400
     8.3 @@ -28,6 +28,12 @@
     8.4     was based off of SDL's "dummy" video driver.
     8.5   */
     8.6  
     8.7 +/* Windows includes */
     8.8 +#include <agile.h>
     8.9 +using namespace Windows::UI::Core;
    8.10 +
    8.11 +
    8.12 +/* SDL includes */
    8.13  extern "C" {
    8.14  #include "SDL_video.h"
    8.15  #include "SDL_mouse.h"
    8.16 @@ -39,20 +45,11 @@
    8.17  }
    8.18  
    8.19  #include "../../core/winrt/SDL_winrtapp.h"
    8.20 -#include "SDL_winrtvideo.h"
    8.21  #include "SDL_winrtevents_c.h"
    8.22  #include "SDL_winrtmouse.h"
    8.23  
    8.24 -using namespace Windows::UI::Core;
    8.25 -
    8.26 -/* On Windows, windows.h defines CreateWindow */
    8.27 -#ifdef CreateWindow
    8.28 -#undef CreateWindow
    8.29 -#endif
    8.30 -
    8.31  extern SDL_WinRTApp ^ SDL_WinRTGlobalApp;
    8.32  
    8.33 -#define WINRTVID_DRIVER_NAME "winrt"
    8.34  
    8.35  /* Initialization/Query functions */
    8.36  static int WINRT_VideoInit(_THIS);
    8.37 @@ -60,11 +57,21 @@
    8.38  static int WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
    8.39  static void WINRT_VideoQuit(_THIS);
    8.40  
    8.41 +
    8.42  /* Window functions */
    8.43  static int WINRT_CreateWindow(_THIS, SDL_Window * window);
    8.44  static void WINRT_DestroyWindow(_THIS, SDL_Window * window);
    8.45  static SDL_bool WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info);
    8.46  
    8.47 +
    8.48 +/* Internal window data */
    8.49 +struct SDL_WindowData
    8.50 +{
    8.51 +    SDL_Window *sdlWindow;
    8.52 +    Platform::Agile<Windows::UI::Core::CoreWindow> coreWindow;
    8.53 +};
    8.54 +
    8.55 +
    8.56  /* WinRT driver bootstrap functions */
    8.57  
    8.58  static int
    8.59 @@ -102,17 +109,14 @@
    8.60      device->DestroyWindow = WINRT_DestroyWindow;
    8.61      device->SetDisplayMode = WINRT_SetDisplayMode;
    8.62      device->PumpEvents = WINRT_PumpEvents;
    8.63 -    //device->CreateWindowFramebuffer = SDL_WINRT_CreateWindowFramebuffer;
    8.64 -    //device->UpdateWindowFramebuffer = SDL_WINRT_UpdateWindowFramebuffer;
    8.65 -    //device->DestroyWindowFramebuffer = SDL_WINRT_DestroyWindowFramebuffer;
    8.66      device->GetWindowWMInfo = WINRT_GetWindowWMInfo;
    8.67      device->free = WINRT_DeleteDevice;
    8.68 -
    8.69      SDL_WinRTGlobalApp->SetSDLVideoDevice(device);
    8.70  
    8.71      return device;
    8.72  }
    8.73  
    8.74 +#define WINRTVID_DRIVER_NAME "winrt"
    8.75  VideoBootStrap WINRT_bootstrap = {
    8.76      WINRTVID_DRIVER_NAME, "SDL Windows RT video driver",
    8.77      WINRT_Available, WINRT_CreateDevice
    8.78 @@ -160,8 +164,7 @@
    8.79  {
    8.80      // Make sure that only one window gets created, at least until multimonitor
    8.81      // support is added.
    8.82 -    if (SDL_WinRTGlobalApp->HasSDLWindowData())
    8.83 -    {
    8.84 +    if (SDL_WinRTGlobalApp->GetSDLWindow() != NULL) {
    8.85          SDL_SetError("WinRT only supports one window");
    8.86          return -1;
    8.87      }
    8.88 @@ -199,7 +202,7 @@
    8.89      /* Make sure the WinRT app's IFramworkView can post events on
    8.90         behalf of SDL:
    8.91      */
    8.92 -    SDL_WinRTGlobalApp->SetSDLWindowData(data);
    8.93 +    SDL_WinRTGlobalApp->SetSDLWindow(window);
    8.94  
    8.95      /* All done! */
    8.96      return 0;
    8.97 @@ -210,10 +213,8 @@
    8.98  {
    8.99      SDL_WindowData * data = (SDL_WindowData *) window->driverdata;
   8.100  
   8.101 -    if (SDL_WinRTGlobalApp->HasSDLWindowData() &&
   8.102 -        SDL_WinRTGlobalApp->GetSDLWindowData()->sdlWindow == window)
   8.103 -    {
   8.104 -        SDL_WinRTGlobalApp->SetSDLWindowData(NULL);
   8.105 +    if (SDL_WinRTGlobalApp->GetSDLWindow() == window) {
   8.106 +        SDL_WinRTGlobalApp->SetSDLWindow(NULL);
   8.107      }
   8.108  
   8.109      if (data) {
     9.1 --- a/src/video/winrt/SDL_winrtvideo.h	Tue Aug 27 11:00:52 2013 -0400
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,40 +0,0 @@
     9.4 -/*
     9.5 -  Simple DirectMedia Layer
     9.6 -  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     9.7 -
     9.8 -  This software is provided 'as-is', without any express or implied
     9.9 -  warranty.  In no event will the authors be held liable for any damages
    9.10 -  arising from the use of this software.
    9.11 -
    9.12 -  Permission is granted to anyone to use this software for any purpose,
    9.13 -  including commercial applications, and to alter it and redistribute it
    9.14 -  freely, subject to the following restrictions:
    9.15 -
    9.16 -  1. The origin of this software must not be misrepresented; you must not
    9.17 -     claim that you wrote the original software. If you use this software
    9.18 -     in a product, an acknowledgment in the product documentation would be
    9.19 -     appreciated but is not required.
    9.20 -  2. Altered source versions must be plainly marked as such, and must not be
    9.21 -     misrepresented as being the original software.
    9.22 -  3. This notice may not be removed or altered from any source distribution.
    9.23 -*/
    9.24 -#include "SDL_config.h"
    9.25 -
    9.26 -#ifndef _SDL_winrtvideo_h
    9.27 -#define _SDL_winrtvideo_h
    9.28 -
    9.29 -extern "C" {
    9.30 -#include "../SDL_sysvideo.h"
    9.31 -}
    9.32 -
    9.33 -#include <agile.h>
    9.34 -
    9.35 -struct SDL_WindowData
    9.36 -{
    9.37 -    SDL_Window *sdlWindow;
    9.38 -    Platform::Agile<Windows::UI::Core::CoreWindow> coreWindow;
    9.39 -};
    9.40 -
    9.41 -#endif /* _SDL_winrtvideo_h */
    9.42 -
    9.43 -/* vi: set ts=4 sw=4 expandtab: */