From 0022dbf261cbbc4b9ddf8038f7c6bd7d874016a0 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 16 Sep 2013 11:02:18 -0400 Subject: [PATCH] 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 | 4 ++-- src/video/winrt/SDL_winrtvideo.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h index ed8f6a93b496f..df54eca2ae42e 100644 --- a/include/SDL_syswm.h +++ b/include/SDL_syswm.h @@ -57,7 +57,7 @@ struct SDL_SysWMinfo; #endif #if defined(SDL_VIDEO_DRIVER_WINRT) -#include +#include #endif /* This is the structure for custom window manager events */ @@ -177,7 +177,7 @@ struct SDL_SysWMinfo #if defined(SDL_VIDEO_DRIVER_WINRT) struct { - IUnknown * window; /**< The WinRT CoreWindow */ + IInspectable * window; /**< The WinRT CoreWindow */ } winrt; #endif #if defined(SDL_VIDEO_DRIVER_X11) diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 2bd4444718757..c0b75c0ebbd48 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -300,7 +300,7 @@ WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) if (info->version.major <= SDL_MAJOR_VERSION) { info->subsystem = SDL_SYSWM_WINRT; - info->info.winrt.window = reinterpret_cast(data->coreWindow.Get()); + info->info.winrt.window = reinterpret_cast(data->coreWindow.Get()); return SDL_TRUE; } else { SDL_SetError("Application not compiled with SDL %d.%d\n",