WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format
authorDavid Ludwig <dludwig@pobox.com>
Mon, 16 Sep 2013 11:02:18 -0400
changeset 8527e3807733fad5
parent 8526 1d613b04bb17
child 8528 38d0b62a215f
WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format

Having the window pointer available as a WinRT IInspectable should make it a bit easier to use in conjunction with WRL-based weak references.
include/SDL_syswm.h
src/video/winrt/SDL_winrtvideo.cpp
     1.1 --- a/include/SDL_syswm.h	Mon Sep 16 00:31:01 2013 -0400
     1.2 +++ b/include/SDL_syswm.h	Mon Sep 16 11:02:18 2013 -0400
     1.3 @@ -57,7 +57,7 @@
     1.4  #endif
     1.5  
     1.6  #if defined(SDL_VIDEO_DRIVER_WINRT)
     1.7 -#include <Unknwn.h>
     1.8 +#include <Inspectable.h>
     1.9  #endif
    1.10  
    1.11  /* This is the structure for custom window manager events */
    1.12 @@ -177,7 +177,7 @@
    1.13  #if defined(SDL_VIDEO_DRIVER_WINRT)
    1.14          struct
    1.15          {
    1.16 -            IUnknown * window;          /**< The WinRT CoreWindow */
    1.17 +            IInspectable * window;      /**< The WinRT CoreWindow */
    1.18          } winrt;
    1.19  #endif
    1.20  #if defined(SDL_VIDEO_DRIVER_X11)
     2.1 --- a/src/video/winrt/SDL_winrtvideo.cpp	Mon Sep 16 00:31:01 2013 -0400
     2.2 +++ b/src/video/winrt/SDL_winrtvideo.cpp	Mon Sep 16 11:02:18 2013 -0400
     2.3 @@ -300,7 +300,7 @@
     2.4  
     2.5      if (info->version.major <= SDL_MAJOR_VERSION) {
     2.6          info->subsystem = SDL_SYSWM_WINRT;
     2.7 -        info->info.winrt.window = reinterpret_cast<IUnknown *>(data->coreWindow.Get());
     2.8 +        info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
     2.9          return SDL_TRUE;
    2.10      } else {
    2.11          SDL_SetError("Application not compiled with SDL %d.%d\n",