Skip to content

Commit

Permalink
WinRT: made SDL_GetWindowWMInfo return window data in a slightly easi…
Browse files Browse the repository at this point in the history
…er-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.
  • Loading branch information
DavidLudwig committed Sep 16, 2013
1 parent fa45a9c commit 0022dbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/SDL_syswm.h
Expand Up @@ -57,7 +57,7 @@ struct SDL_SysWMinfo;
#endif

#if defined(SDL_VIDEO_DRIVER_WINRT)
#include <Unknwn.h>
#include <Inspectable.h>
#endif

/* This is the structure for custom window manager events */
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/video/winrt/SDL_winrtvideo.cpp
Expand Up @@ -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<IUnknown *>(data->coreWindow.Get());
info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
return SDL_TRUE;
} else {
SDL_SetError("Application not compiled with SDL %d.%d\n",
Expand Down

0 comments on commit 0022dbf

Please sign in to comment.