WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0
authorDavid Ludwig <dludwig@pobox.com>
Tue, 13 Aug 2013 20:09:52 -0400
changeset 8478337b5dc0797b
parent 8477 ad08f0d710f3
child 8479 f92a250b4a3f
WinRT: build fixes and additional WinRT-related integrations with SDL 2.0.0
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj
VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters
include/SDL_config_windowsrt.h
include/SDL_platform.h
include/SDL_stdinc.h
src/SDL_log.c
src/audio/xaudio2/SDL_xaudio2.c
src/joystick/SDL_gamecontrollerdb.h
src/render/SDL_render.c
src/stdlib/SDL_stdlib.c
src/thread/stdcpp/SDL_systhread.cpp
src/timer/windows/SDL_systimer.c
src/video/windowsrt/SDL_WinRTApp.cpp
     1.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Mon Aug 12 22:29:55 2013 -0400
     1.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj	Tue Aug 13 20:09:52 2013 -0400
     1.3 @@ -100,11 +100,11 @@
     1.4      <ClCompile Include="..\..\src\SDL.c" />
     1.5      <ClCompile Include="..\..\src\SDL_assert.c" />
     1.6      <ClCompile Include="..\..\src\SDL_error.c" />
     1.7 -    <ClCompile Include="..\..\src\SDL_fatal.c" />
     1.8      <ClCompile Include="..\..\src\SDL_hints.c" />
     1.9      <ClCompile Include="..\..\src\SDL_log.c" />
    1.10      <ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
    1.11      <ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
    1.12 +    <ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
    1.13      <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    1.14      <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    1.15      <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    1.16 @@ -239,6 +239,7 @@
    1.17      <ClInclude Include="..\..\src\events\SDL_windowevents_c.h" />
    1.18      <ClInclude Include="..\..\src\haptic\SDL_haptic_c.h" />
    1.19      <ClInclude Include="..\..\src\haptic\SDL_syshaptic.h" />
    1.20 +    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
    1.21      <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
    1.22      <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
    1.23      <ClInclude Include="..\..\src\render\direct3d11\SDL_render_d3d11_cpp.h" />
     2.1 --- a/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Mon Aug 12 22:29:55 2013 -0400
     2.2 +++ b/VisualC-WinRT/SDL/SDL_VS2012-WinRT.vcxproj.filters	Tue Aug 13 20:09:52 2013 -0400
     2.3 @@ -96,9 +96,6 @@
     2.4      <ClCompile Include="..\..\src\events\SDL_events.c">
     2.5        <Filter>Source Files</Filter>
     2.6      </ClCompile>
     2.7 -    <ClCompile Include="..\..\src\SDL_fatal.c">
     2.8 -      <Filter>Source Files</Filter>
     2.9 -    </ClCompile>
    2.10      <ClCompile Include="..\..\src\video\SDL_fillrect.c">
    2.11        <Filter>Source Files</Filter>
    2.12      </ClCompile>
    2.13 @@ -267,6 +264,9 @@
    2.14      <ClCompile Include="..\..\src\joystick\windowsrt\SDL_xinputjoystick.c">
    2.15        <Filter>Source Files</Filter>
    2.16      </ClCompile>
    2.17 +    <ClCompile Include="..\..\src\stdlib\SDL_malloc.c">
    2.18 +      <Filter>Source Files</Filter>
    2.19 +    </ClCompile>
    2.20    </ItemGroup>
    2.21    <ItemGroup>
    2.22      <ClInclude Include="..\..\include\begin_code.h">
    2.23 @@ -593,6 +593,9 @@
    2.24      <ClInclude Include="..\..\src\render\direct3d11\SDL_render_d3d11_cpp.h">
    2.25        <Filter>Source Files</Filter>
    2.26      </ClInclude>
    2.27 +    <ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h">
    2.28 +      <Filter>Header Files</Filter>
    2.29 +    </ClInclude>
    2.30    </ItemGroup>
    2.31    <ItemGroup>
    2.32      <Filter Include="Header Files">
     3.1 --- a/include/SDL_config_windowsrt.h	Mon Aug 12 22:29:55 2013 -0400
     3.2 +++ b/include/SDL_config_windowsrt.h	Tue Aug 13 20:09:52 2013 -0400
     3.3 @@ -83,6 +83,7 @@
     3.4  #define HAVE_STRING_H 1
     3.5  #define HAVE_CTYPE_H 1
     3.6  #define HAVE_MATH_H 1
     3.7 +#define HAVE_FLOAT_H 1
     3.8  #define HAVE_SIGNAL_H 1
     3.9  
    3.10  /* C library functions */
    3.11 @@ -123,7 +124,7 @@
    3.12  #define HAVE_ATAN 1
    3.13  #define HAVE_ATAN2 1
    3.14  #define HAVE_CEIL 1
    3.15 -//#define HAVE_COPYSIGN 1   // TODO, WinRT: consider using _copysign instead
    3.16 +#define HAVE__COPYSIGN 1
    3.17  #define HAVE_COS 1
    3.18  #define HAVE_COSF 1
    3.19  #define HAVE_FABS 1
    3.20 @@ -131,6 +132,7 @@
    3.21  #define HAVE_LOG 1
    3.22  #define HAVE_POW 1
    3.23  //#define HAVE_SCALBN 1
    3.24 +#define HAVE__SCALB 1
    3.25  #define HAVE_SIN 1
    3.26  #define HAVE_SINF 1
    3.27  #define HAVE_SQRT 1
     4.1 --- a/include/SDL_platform.h	Mon Aug 12 22:29:55 2013 -0400
     4.2 +++ b/include/SDL_platform.h	Tue Aug 13 20:09:52 2013 -0400
     4.3 @@ -120,10 +120,27 @@
     4.4  #undef __SOLARIS__
     4.5  #define __SOLARIS__ 1
     4.6  #endif
     4.7 -#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
     4.8 -#undef __WIN32__
     4.9 -#define __WIN32__   1
    4.10 -#endif
    4.11 +
    4.12 +#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
    4.13 +/* Try to find out what version of Windows we are compiling for */
    4.14 +#if defined(_MSC_VER) && (_MSC_VER >= 1700)	/* _MSC_VER==1700 for MSVC 2012 */
    4.15 +#include <winapifamily.h>
    4.16 +#endif
    4.17 +/* Default to classic, Win32 / Desktop compilation either if:
    4.18 +     1. the version of Windows is explicity set to a 'Desktop' (non-Metro) app
    4.19 +     2. the version of Windows cannot be determined via winapifamily.h
    4.20 +   If neither is true, see if we're compiling for WinRT.
    4.21 + */
    4.22 +#if ! defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
    4.23 +#undef __WIN32__
    4.24 +#define __WIN32__   1
    4.25 +/* See if we're compiling for WinRT: */
    4.26 +#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
    4.27 +#undef __WINRT__
    4.28 +#define __WINRT__ 1
    4.29 +#endif /* ! defined(WINAPI_FAMILY_PARTITION) */
    4.30 +#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
    4.31 +
    4.32  #if defined(__PSP__)
    4.33  #undef __PSP__
    4.34  #define __PSP__ 1
     5.1 --- a/include/SDL_stdinc.h	Mon Aug 12 22:29:55 2013 -0400
     5.2 +++ b/include/SDL_stdinc.h	Tue Aug 13 20:09:52 2013 -0400
     5.3 @@ -80,6 +80,9 @@
     5.4  # endif
     5.5  # include <math.h>
     5.6  #endif
     5.7 +#ifdef HAVE_FLOAT_H
     5.8 +# include <float.h>
     5.9 +#endif
    5.10  #if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
    5.11  # include <iconv.h>
    5.12  #endif
     6.1 --- a/src/SDL_log.c	Mon Aug 12 22:29:55 2013 -0400
     6.2 +++ b/src/SDL_log.c	Tue Aug 13 20:09:52 2013 -0400
     6.3 @@ -322,6 +322,8 @@
     6.4          char *output;
     6.5          size_t length;
     6.6          LPTSTR tstr;
     6.7 +
     6.8 +#ifndef __WINRT__
     6.9          BOOL attachResult;
    6.10          DWORD attachError;
    6.11          unsigned long charsWritten; 
    6.12 @@ -353,6 +355,7 @@
    6.13                          stderrHandle = GetStdHandle(STD_ERROR_HANDLE);
    6.14                  }
    6.15          }
    6.16 +#endif /* ifndef __WINRT__ */
    6.17  
    6.18          length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1;
    6.19          output = SDL_stack_alloc(char, length);
    6.20 @@ -362,6 +365,7 @@
    6.21          /* Output to debugger */
    6.22          OutputDebugString(tstr);
    6.23         
    6.24 +#ifndef __WINRT__
    6.25          /* Screen output to stderr, if console was attached. */
    6.26          if (consoleAttached == 1) {
    6.27                  if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
    6.28 @@ -371,6 +375,7 @@
    6.29                      OutputDebugString(TEXT("Insufficient heap memory to write message"));
    6.30                  }
    6.31          }
    6.32 +#endif /* ifndef __WINRT__ */
    6.33  
    6.34          SDL_free(tstr);
    6.35          SDL_stack_free(output);
     7.1 --- a/src/audio/xaudio2/SDL_xaudio2.c	Mon Aug 12 22:29:55 2013 -0400
     7.2 +++ b/src/audio/xaudio2/SDL_xaudio2.c	Tue Aug 13 20:09:52 2013 -0400
     7.3 @@ -91,15 +91,11 @@
     7.4  }
     7.5  #endif
     7.6  
     7.7 -#if defined(__WINRT__)
     7.8 -#  define SDL_XAUDIO2_HAS_SDK 1
     7.9 -#endif
    7.10 -#if defined(__WIN32__)
    7.11  #ifdef __GNUC__
    7.12  /* The configure script already did any necessary checking */
    7.13  #  define SDL_XAUDIO2_HAS_SDK 1
    7.14  #elif defined(__WINRT__)
    7.15 -/* WinRT always has access to the .the XAudio 2 SD
    7.16 +/* WinRT always has access to the .the XAudio 2 SDK */
    7.17  #  define SDL_XAUDIO2_HAS_SDK
    7.18  #else
    7.19  #include <dxsdkver.h> /* XAudio2 exists as of the March 2008 DirectX SDK */
     8.1 --- a/src/joystick/SDL_gamecontrollerdb.h	Mon Aug 12 22:29:55 2013 -0400
     8.2 +++ b/src/joystick/SDL_gamecontrollerdb.h	Tue Aug 13 20:09:52 2013 -0400
     8.3 @@ -38,6 +38,8 @@
     8.4      "4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,",
     8.5      "25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,",
     8.6      "xinput,X360 Controller,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,guide:b14,leftshoulder:b8,leftstick:b6,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b4,x:b12,y:b13,",
     8.7 +#elif defined(SDL_JOYSTICK_XINPUT)
     8.8 +    "xinput,X360 Controller,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,guide:b14,leftshoulder:b8,leftstick:b6,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b4,x:b12,y:b13,",
     8.9  #elif defined(__MACOSX__)
    8.10      "0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
    8.11      "6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,", /* Guide button doesn't seem to be sent in DInput mode. */
     9.1 --- a/src/render/SDL_render.c	Mon Aug 12 22:29:55 2013 -0400
     9.2 +++ b/src/render/SDL_render.c	Tue Aug 13 20:09:52 2013 -0400
     9.3 @@ -49,6 +49,9 @@
     9.4  #if SDL_VIDEO_RENDER_D3D
     9.5      &D3D_RenderDriver,
     9.6  #endif
     9.7 +#if SDL_VIDEO_RENDER_D3D11
     9.8 +    &D3D11_RenderDriver,
     9.9 +#endif
    9.10  #if SDL_VIDEO_RENDER_OGL
    9.11      &GL_RenderDriver,
    9.12  #endif
    10.1 --- a/src/stdlib/SDL_stdlib.c	Mon Aug 12 22:29:55 2013 -0400
    10.2 +++ b/src/stdlib/SDL_stdlib.c	Tue Aug 13 20:09:52 2013 -0400
    10.3 @@ -61,6 +61,8 @@
    10.4  {
    10.5  #if defined(HAVE_COPYSIGN)
    10.6      return copysign(x, y);
    10.7 +#elif defined(HAVE__COPYSIGN)
    10.8 +    return _copysign(x, y);
    10.9  #else
   10.10      return SDL_uclibc_copysign(x, y);
   10.11  #endif /* HAVE_COPYSIGN */
   10.12 @@ -131,6 +133,8 @@
   10.13  {
   10.14  #if defined(HAVE_SCALBN)
   10.15      return scalbn(x, n);
   10.16 +#elif defined(HAVE__SCALB)
   10.17 +    return _scalb(x, n);
   10.18  #else
   10.19      return SDL_uclibc_scalbn(x, n);
   10.20  #endif /* HAVE_SCALBN */
    11.1 --- a/src/thread/stdcpp/SDL_systhread.cpp	Mon Aug 12 22:29:55 2013 -0400
    11.2 +++ b/src/thread/stdcpp/SDL_systhread.cpp	Tue Aug 13 20:09:52 2013 -0400
    11.3 @@ -24,8 +24,8 @@
    11.4  
    11.5  extern "C" {
    11.6  #include "SDL_thread.h"
    11.7 +#include "../SDL_thread_c.h"
    11.8  #include "../SDL_systhread.h"
    11.9 -#include "../SDL_thread_c.h"
   11.10  #include "SDL_log.h"
   11.11  }
   11.12  
   11.13 @@ -121,4 +121,18 @@
   11.14      }
   11.15  }
   11.16  
   11.17 +extern "C"
   11.18 +SDL_TLSData *
   11.19 +SDL_SYS_GetTLSData()
   11.20 +{
   11.21 +    return SDL_Generic_GetTLSData();
   11.22 +}
   11.23 +
   11.24 +extern "C"
   11.25 +int
   11.26 +SDL_SYS_SetTLSData(SDL_TLSData *data)
   11.27 +{
   11.28 +    return SDL_Generic_SetTLSData(data);
   11.29 +}
   11.30 +
   11.31  /* vi: set ts=4 sw=4 expandtab: */
    12.1 --- a/src/timer/windows/SDL_systimer.c	Mon Aug 12 22:29:55 2013 -0400
    12.2 +++ b/src/timer/windows/SDL_systimer.c	Tue Aug 13 20:09:52 2013 -0400
    12.3 @@ -41,6 +41,7 @@
    12.4  static LARGE_INTEGER hires_ticks_per_second;
    12.5  #endif
    12.6  
    12.7 +#ifndef __WINRT__
    12.8  static void
    12.9  timeSetPeriod(UINT uPeriod)
   12.10  {
   12.11 @@ -74,6 +75,7 @@
   12.12          timeSetPeriod(uPeriod);
   12.13      }
   12.14  }
   12.15 +#endif /* ifndef __WINRT__ */
   12.16  
   12.17  void
   12.18  SDL_StartTicks(void)
   12.19 @@ -90,13 +92,19 @@
   12.20          QueryPerformanceCounter(&hires_start_ticks);
   12.21      } else {
   12.22          hires_timer_available = FALSE;
   12.23 +#ifdef __WINRT__
   12.24 +        start = 0;            /* the timer failed to start! */
   12.25 +#else
   12.26          timeSetPeriod(1);     /* use 1 ms timer precision */
   12.27          start = timeGetTime();
   12.28 +#endif /* ifdef __WINRT__ */
   12.29      }
   12.30  #endif
   12.31  
   12.32 +#ifndef __WINRT__
   12.33      SDL_AddHintCallback(SDL_HINT_TIMER_RESOLUTION,
   12.34                          SDL_TimerResolutionChanged, NULL);
   12.35 +#endif
   12.36  }
   12.37  
   12.38  Uint32
   12.39 @@ -119,7 +127,11 @@
   12.40  
   12.41          return (DWORD) hires_now.QuadPart;
   12.42      } else {
   12.43 +#ifdef __WINRT__
   12.44 +        now = 0;
   12.45 +#else
   12.46          now = timeGetTime();
   12.47 +#endif // ifdef __WINRT__
   12.48      }
   12.49  #endif
   12.50  
   12.51 @@ -148,6 +160,19 @@
   12.52      return frequency.QuadPart;
   12.53  }
   12.54  
   12.55 +#ifdef __WINRT__
   12.56 +static void
   12.57 +Sleep(DWORD timeout)
   12.58 +{
   12.59 +    static HANDLE mutex = 0;
   12.60 +    if ( ! mutex )
   12.61 +    {
   12.62 +        mutex = CreateEventEx(0, 0, 0, EVENT_ALL_ACCESS);
   12.63 +    }
   12.64 +    WaitForSingleObjectEx(mutex, timeout, FALSE);
   12.65 +}
   12.66 +#endif
   12.67 +
   12.68  void
   12.69  SDL_Delay(Uint32 ms)
   12.70  {
    13.1 --- a/src/video/windowsrt/SDL_WinRTApp.cpp	Mon Aug 12 22:29:55 2013 -0400
    13.2 +++ b/src/video/windowsrt/SDL_WinRTApp.cpp	Tue Aug 13 20:09:52 2013 -0400
    13.3 @@ -13,7 +13,7 @@
    13.4  #include "SDL_stdinc.h"
    13.5  #include "SDL_render.h"
    13.6  #include "../SDL_sysvideo.h"
    13.7 -#include "../../SDL_hints_c.h"
    13.8 +//#include "../../SDL_hints_c.h"
    13.9  #include "../../events/scancodes_windows.h"
   13.10  #include "../../events/SDL_mouse_c.h"
   13.11  #include "../../events/SDL_keyboard_c.h"
   13.12 @@ -86,7 +86,7 @@
   13.13      return 0;
   13.14  }
   13.15  
   13.16 -static void WINRT_SetDisplayOrientationsPreference(const char *name, const char *oldValue, const char *newValue)
   13.17 +static void WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue)
   13.18  {
   13.19      SDL_assert(SDL_strcmp(name, SDL_HINT_ORIENTATIONS) == 0);
   13.20  
   13.21 @@ -163,8 +163,8 @@
   13.22      // otherwise the hint callback won't get registered.
   13.23      //
   13.24      // WinRT, TODO: see if an app's default orientation can be found out via WinRT API(s), then set the initial value of SDL_HINT_ORIENTATIONS accordingly.
   13.25 -    SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight Portrait PortraitUpsideDown");
   13.26 -    SDL_RegisterHintChangedCb(SDL_HINT_ORIENTATIONS, WINRT_SetDisplayOrientationsPreference);
   13.27 +    //SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight Portrait PortraitUpsideDown");   // DavidL: this is no longer needed (for SDL_AddHintCallback)
   13.28 +    SDL_AddHintCallback(SDL_HINT_ORIENTATIONS, WINRT_SetDisplayOrientationsPreference, NULL);
   13.29  }
   13.30  
   13.31  void SDL_WinRTApp::OnOrientationChanged(Object^ sender)
   13.32 @@ -316,15 +316,19 @@
   13.33          // Windows device.
   13.34          //
   13.35          // Commencing hack in 3... 2... 1...
   13.36 -        SDL_Renderer * rendererForMainWindow = SDL_GetRenderer(m_sdlWindowData->sdlWindow);
   13.37 +        //
   13.38 +        // UPDATE, SDL 2.0.0 update: the 'resized' flag is now gone.  This
   13.39 +        // hack might not be necessary any more.
   13.40 +        //
   13.41 +        //SDL_Renderer * rendererForMainWindow = SDL_GetRenderer(m_sdlWindowData->sdlWindow);
   13.42          // For now, limit the hack to when the Direct3D 11.1 is getting used:
   13.43 -        const bool usingD3D11Renderer = \
   13.44 -            (rendererForMainWindow != NULL) &&
   13.45 -            (SDL_strcmp(rendererForMainWindow->info.name, "direct3d 11.1") == 0);
   13.46 -        SDL_bool wasD3D11RendererResized = SDL_FALSE;
   13.47 -        if (usingD3D11Renderer) {
   13.48 -            wasD3D11RendererResized = rendererForMainWindow->resized;
   13.49 -        }
   13.50 +        //const bool usingD3D11Renderer = \
   13.51 +        //    (rendererForMainWindow != NULL) &&
   13.52 +        //    (SDL_strcmp(rendererForMainWindow->info.name, "direct3d 11.1") == 0);
   13.53 +        //SDL_bool wasD3D11RendererResized = SDL_FALSE;
   13.54 +        //if (usingD3D11Renderer) {
   13.55 +        //    wasD3D11RendererResized = rendererForMainWindow->resized;
   13.56 +        //}
   13.57  
   13.58          // Send the window-resize event to the rest of SDL, and to apps:
   13.59          const int windowWidth = (int) ceil(args->Size.Width);
   13.60 @@ -335,10 +339,10 @@
   13.61              windowWidth,
   13.62              windowHeight);
   13.63  
   13.64 -        // Viewport hack, part two:
   13.65 -        if (usingD3D11Renderer) {
   13.66 -            rendererForMainWindow->resized = wasD3D11RendererResized;
   13.67 -        }
   13.68 +        //// Viewport hack, part two:
   13.69 +        //if (usingD3D11Renderer) {
   13.70 +        //    rendererForMainWindow->resized = wasD3D11RendererResized;
   13.71 +        //}
   13.72      }
   13.73  }
   13.74