src/video/winrt/SDL_winrtvideo.cpp
author David Ludwig <dludwig@pobox.com>
Sat, 01 Mar 2014 16:37:30 -0500
changeset 8579 ee7126c459d0
parent 8578 6517b6aca713
child 8582 c3e9a2b93517
permissions -rw-r--r--
WinRT: cleaned up some hard-to-read SDL_DisplayMode management code
dludwig@8327
     1
/*
dludwig@8327
     2
  Simple DirectMedia Layer
dludwig@8327
     3
  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
dludwig@8327
     4
dludwig@8327
     5
  This software is provided 'as-is', without any express or implied
dludwig@8327
     6
  warranty.  In no event will the authors be held liable for any damages
dludwig@8327
     7
  arising from the use of this software.
dludwig@8327
     8
dludwig@8327
     9
  Permission is granted to anyone to use this software for any purpose,
dludwig@8327
    10
  including commercial applications, and to alter it and redistribute it
dludwig@8327
    11
  freely, subject to the following restrictions:
dludwig@8327
    12
dludwig@8327
    13
  1. The origin of this software must not be misrepresented; you must not
dludwig@8327
    14
     claim that you wrote the original software. If you use this software
dludwig@8327
    15
     in a product, an acknowledgment in the product documentation would be
dludwig@8327
    16
     appreciated but is not required.
dludwig@8327
    17
  2. Altered source versions must be plainly marked as such, and must not be
dludwig@8327
    18
     misrepresented as being the original software.
dludwig@8327
    19
  3. This notice may not be removed or altered from any source distribution.
dludwig@8327
    20
*/
dludwig@8327
    21
#include "SDL_config.h"
dludwig@8327
    22
dludwig@8327
    23
#if SDL_VIDEO_DRIVER_WINRT
dludwig@8327
    24
dludwig@8327
    25
/* WinRT SDL video driver implementation
dludwig@8327
    26
dludwig@8327
    27
   Initial work on this was done by David Ludwig (dludwig@pobox.com), and
dludwig@8327
    28
   was based off of SDL's "dummy" video driver.
dludwig@8327
    29
 */
dludwig@8327
    30
dludwig@8494
    31
/* Windows includes */
dludwig@8494
    32
#include <agile.h>
dludwig@8494
    33
using namespace Windows::UI::Core;
dludwig@8494
    34
dludwig@8494
    35
dludwig@8494
    36
/* SDL includes */
dludwig@8329
    37
extern "C" {
dludwig@8327
    38
#include "SDL_video.h"
dludwig@8327
    39
#include "SDL_mouse.h"
dludwig@8327
    40
#include "../SDL_sysvideo.h"
dludwig@8327
    41
#include "../SDL_pixels_c.h"
dludwig@8327
    42
#include "../../events/SDL_events_c.h"
dludwig@8400
    43
#include "../../render/SDL_sysrender.h"
dludwig@8411
    44
#include "SDL_syswm.h"
dludwig@8541
    45
#include "SDL_winrtopengles.h"
dludwig@8329
    46
}
dludwig@8327
    47
dludwig@8522
    48
#include "../../core/winrt/SDL_winrtapp_direct3d.h"
dludwig@8522
    49
#include "../../core/winrt/SDL_winrtapp_xaml.h"
dludwig@8512
    50
#include "SDL_winrtvideo_cpp.h"
dludwig@8327
    51
#include "SDL_winrtevents_c.h"
dludwig@8516
    52
#include "SDL_winrtmouse_c.h"
dludwig@8505
    53
#include "SDL_main.h"
dludwig@8505
    54
#include "SDL_system.h"
dludwig@8327
    55
dludwig@8327
    56
dludwig@8327
    57
/* Initialization/Query functions */
dludwig@8327
    58
static int WINRT_VideoInit(_THIS);
dludwig@8374
    59
static int WINRT_InitModes(_THIS);
dludwig@8327
    60
static int WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
dludwig@8327
    61
static void WINRT_VideoQuit(_THIS);
dludwig@8327
    62
dludwig@8494
    63
dludwig@8333
    64
/* Window functions */
dludwig@8522
    65
static int WINRT_CreateWindow(_THIS, SDL_Window * window);
dludwig@8333
    66
static void WINRT_DestroyWindow(_THIS, SDL_Window * window);
dludwig@8411
    67
static SDL_bool WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info);
dludwig@8333
    68
dludwig@8494
    69
dludwig@8515
    70
/* SDL-internal globals: */
dludwig@8497
    71
SDL_Window * WINRT_GlobalSDLWindow = NULL;
dludwig@8498
    72
SDL_VideoDevice * WINRT_GlobalSDLVideoDevice = NULL;
dludwig@8498
    73
dludwig@8498
    74
dludwig@8327
    75
/* WinRT driver bootstrap functions */
dludwig@8327
    76
dludwig@8327
    77
static int
dludwig@8327
    78
WINRT_Available(void)
dludwig@8327
    79
{
dludwig@8328
    80
    return (1);
dludwig@8327
    81
}
dludwig@8327
    82
dludwig@8327
    83
static void
dludwig@8327
    84
WINRT_DeleteDevice(SDL_VideoDevice * device)
dludwig@8327
    85
{
dludwig@8498
    86
    if (device == WINRT_GlobalSDLVideoDevice) {
dludwig@8498
    87
        WINRT_GlobalSDLVideoDevice = NULL;
dludwig@8498
    88
    }
dludwig@8327
    89
    SDL_free(device);
dludwig@8327
    90
}
dludwig@8327
    91
dludwig@8327
    92
static SDL_VideoDevice *
dludwig@8327
    93
WINRT_CreateDevice(int devindex)
dludwig@8327
    94
{
dludwig@8327
    95
    SDL_VideoDevice *device;
dludwig@8327
    96
dludwig@8327
    97
    /* Initialize all variables that we clean on shutdown */
dludwig@8327
    98
    device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
dludwig@8327
    99
    if (!device) {
dludwig@8327
   100
        SDL_OutOfMemory();
dludwig@8327
   101
        if (device) {
dludwig@8327
   102
            SDL_free(device);
dludwig@8327
   103
        }
dludwig@8327
   104
        return (0);
dludwig@8327
   105
    }
dludwig@8327
   106
dludwig@8327
   107
    /* Set the function pointers */
dludwig@8327
   108
    device->VideoInit = WINRT_VideoInit;
dludwig@8327
   109
    device->VideoQuit = WINRT_VideoQuit;
dludwig@8333
   110
    device->CreateWindow = WINRT_CreateWindow;
dludwig@8333
   111
    device->DestroyWindow = WINRT_DestroyWindow;
dludwig@8327
   112
    device->SetDisplayMode = WINRT_SetDisplayMode;
dludwig@8327
   113
    device->PumpEvents = WINRT_PumpEvents;
dludwig@8411
   114
    device->GetWindowWMInfo = WINRT_GetWindowWMInfo;
dludwig@8541
   115
#ifdef SDL_VIDEO_OPENGL_EGL
dludwig@8541
   116
    device->GL_LoadLibrary = WINRT_GLES_LoadLibrary;
dludwig@8541
   117
    device->GL_GetProcAddress = WINRT_GLES_GetProcAddress;
dludwig@8541
   118
    device->GL_UnloadLibrary = WINRT_GLES_UnloadLibrary;
dludwig@8541
   119
    device->GL_CreateContext = WINRT_GLES_CreateContext;
dludwig@8541
   120
    device->GL_MakeCurrent = WINRT_GLES_MakeCurrent;
dludwig@8541
   121
    device->GL_SetSwapInterval = WINRT_GLES_SetSwapInterval;
dludwig@8541
   122
    device->GL_GetSwapInterval = WINRT_GLES_GetSwapInterval;
dludwig@8541
   123
    device->GL_SwapWindow = WINRT_GLES_SwapWindow;
dludwig@8541
   124
    device->GL_DeleteContext = WINRT_GLES_DeleteContext;
dludwig@8541
   125
#endif
dludwig@8433
   126
    device->free = WINRT_DeleteDevice;
dludwig@8501
   127
    WINRT_GlobalSDLVideoDevice = device;
dludwig@8327
   128
dludwig@8327
   129
    return device;
dludwig@8327
   130
}
dludwig@8327
   131
dludwig@8494
   132
#define WINRTVID_DRIVER_NAME "winrt"
dludwig@8327
   133
VideoBootStrap WINRT_bootstrap = {
dludwig@8500
   134
    WINRTVID_DRIVER_NAME, "SDL WinRT video driver",
dludwig@8327
   135
    WINRT_Available, WINRT_CreateDevice
dludwig@8327
   136
};
dludwig@8327
   137
dludwig@8327
   138
int
dludwig@8327
   139
WINRT_VideoInit(_THIS)
dludwig@8327
   140
{
dludwig@8374
   141
    if (WINRT_InitModes(_this) < 0) {
dludwig@8374
   142
        return -1;
dludwig@8374
   143
    }
dludwig@8374
   144
    WINRT_InitMouse(_this);
dludwig@8515
   145
    WINRT_InitTouch(_this);
dludwig@8522
   146
dludwig@8374
   147
    return 0;
dludwig@8374
   148
}
dludwig@8374
   149
dludwig@8578
   150
int
dludwig@8578
   151
WINRT_CalcDisplayModeUsingNativeWindow(SDL_DisplayMode * mode)
dludwig@8522
   152
{
dludwig@8578
   153
    SDL_DisplayModeData * driverdata;
dludwig@8578
   154
dludwig@8522
   155
    using namespace Windows::Graphics::Display;
dludwig@8522
   156
dludwig@8522
   157
    // Go no further if a native window cannot be accessed.  This can happen,
dludwig@8522
   158
    // for example, if this function is called from certain threads, such as
dludwig@8522
   159
    // the SDL/XAML thread.
dludwig@8522
   160
    if (!CoreWindow::GetForCurrentThread()) {
dludwig@8578
   161
        return SDL_SetError("SDL/WinRT display modes cannot be calculated outside of the main thread, such as in SDL's XAML thread");
dludwig@8522
   162
    }
dludwig@8522
   163
dludwig@8579
   164
    // Calculate the display size given the window size, taking into account
dludwig@8579
   165
    // the current display's DPI:
dludwig@8579
   166
    const float currentDPI = Windows::Graphics::Display::DisplayProperties::LogicalDpi; 
dludwig@8579
   167
    const float dipsPerInch = 96.0f;
dludwig@8579
   168
    const int w = (int) ((CoreWindow::GetForCurrentThread()->Bounds.Width * currentDPI) / dipsPerInch);
dludwig@8579
   169
    const int h = (int) ((CoreWindow::GetForCurrentThread()->Bounds.Height * currentDPI) / dipsPerInch);
dludwig@8579
   170
    if (w == 0 || w == h) {
dludwig@8579
   171
        return SDL_SetError("Unable to calculate the WinRT window/display's size");
dludwig@8579
   172
    }
dludwig@8579
   173
dludwig@8578
   174
    // Create a driverdata field:
dludwig@8578
   175
    driverdata = (SDL_DisplayModeData *) SDL_malloc(sizeof(*driverdata));
dludwig@8578
   176
    if (!driverdata) {
dludwig@8578
   177
        return SDL_OutOfMemory();
dludwig@8578
   178
    }
dludwig@8578
   179
    SDL_zerop(driverdata);
dludwig@8578
   180
dludwig@8522
   181
    // Fill in most fields:
dludwig@8579
   182
    SDL_zerop(mode);
dludwig@8578
   183
    mode->format = SDL_PIXELFORMAT_RGB888;
dludwig@8578
   184
    mode->refresh_rate = 0;  // TODO, WinRT: see if refresh rate data is available, or relevant (for WinRT apps)
dludwig@8579
   185
    mode->w = w;
dludwig@8579
   186
    mode->h = h;
dludwig@8578
   187
    mode->driverdata = driverdata;
dludwig@8578
   188
    driverdata->currentOrientation = DisplayProperties::CurrentOrientation;
dludwig@8522
   189
dludwig@8522
   190
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
dludwig@8522
   191
    // On Windows Phone, the native window's size is always in portrait,
dludwig@8522
   192
    // regardless of the device's orientation.  This is in contrast to
dludwig@8522
   193
    // Windows 8/RT, which will resize the native window as the device's
dludwig@8522
   194
    // orientation changes.  In order to compensate for this behavior,
dludwig@8522
   195
    // on Windows Phone, the mode's width and height will be swapped when
dludwig@8522
   196
    // the device is in a landscape (non-portrait) mode.
dludwig@8522
   197
    switch (DisplayProperties::CurrentOrientation) {
dludwig@8522
   198
        case DisplayOrientations::Landscape:
dludwig@8522
   199
        case DisplayOrientations::LandscapeFlipped:
dludwig@8522
   200
        {
dludwig@8578
   201
            const int tmp = mode->h;
dludwig@8578
   202
            mode->h = mode->w;
dludwig@8578
   203
            mode->w = tmp;
dludwig@8522
   204
            break;
dludwig@8522
   205
        }
dludwig@8522
   206
dludwig@8522
   207
        default:
dludwig@8522
   208
            break;
dludwig@8522
   209
    }
dludwig@8522
   210
#endif
dludwig@8522
   211
dludwig@8578
   212
    return 0;
dludwig@8578
   213
}
dludwig@8578
   214
dludwig@8578
   215
int
dludwig@8578
   216
WINRT_DuplicateDisplayMode(SDL_DisplayMode * dest, const SDL_DisplayMode * src)
dludwig@8578
   217
{
dludwig@8578
   218
    SDL_DisplayModeData * driverdata;
dludwig@8578
   219
    driverdata = (SDL_DisplayModeData *) SDL_malloc(sizeof(*driverdata));
dludwig@8578
   220
    if (!driverdata) {
dludwig@8578
   221
        return SDL_OutOfMemory();
dludwig@8578
   222
    }
dludwig@8578
   223
    SDL_memcpy(driverdata, src->driverdata, sizeof(SDL_DisplayModeData));
dludwig@8578
   224
    SDL_memcpy(dest, src, sizeof(SDL_DisplayMode));
dludwig@8578
   225
    dest->driverdata = driverdata;
dludwig@8578
   226
    return 0;
dludwig@8522
   227
}
dludwig@8503
   228
dludwig@8505
   229
int
dludwig@8374
   230
WINRT_InitModes(_THIS)
dludwig@8374
   231
{
dludwig@8505
   232
    // Retrieve the display mode:
dludwig@8578
   233
    SDL_DisplayMode mode, desktop_mode;
dludwig@8578
   234
    if (WINRT_CalcDisplayModeUsingNativeWindow(&mode) != 0) {
dludwig@8578
   235
        return -1;	// If WINRT_CalcDisplayModeUsingNativeWindow fails, it'll already have set the SDL error
dludwig@8578
   236
    }
dludwig@8522
   237
dludwig@8578
   238
    if (WINRT_DuplicateDisplayMode(&desktop_mode, &mode) != 0) {
dludwig@8578
   239
        return -1;
dludwig@8578
   240
    }
dludwig@8578
   241
    if (SDL_AddBasicVideoDisplay(&desktop_mode) < 0) {
dludwig@8522
   242
        return -1;
dludwig@8374
   243
    }
dludwig@8374
   244
dludwig@8374
   245
    SDL_AddDisplayMode(&_this->displays[0], &mode);
dludwig@8327
   246
    return 0;
dludwig@8327
   247
}
dludwig@8327
   248
dludwig@8327
   249
static int
dludwig@8327
   250
WINRT_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
dludwig@8327
   251
{
dludwig@8327
   252
    return 0;
dludwig@8327
   253
}
dludwig@8327
   254
dludwig@8327
   255
void
dludwig@8327
   256
WINRT_VideoQuit(_THIS)
dludwig@8327
   257
{
dludwig@8374
   258
    WINRT_QuitMouse(_this);
dludwig@8327
   259
}
dludwig@8327
   260
dludwig@8522
   261
int
dludwig@8522
   262
WINRT_CreateWindow(_THIS, SDL_Window * window)
dludwig@8522
   263
{
dludwig@8522
   264
    // Make sure that only one window gets created, at least until multimonitor
dludwig@8522
   265
    // support is added.
dludwig@8522
   266
    if (WINRT_GlobalSDLWindow != NULL) {
dludwig@8522
   267
        SDL_SetError("WinRT only supports one window");
dludwig@8522
   268
        return -1;
dludwig@8522
   269
    }
dludwig@8522
   270
dludwig@8522
   271
    SDL_WindowData *data = new SDL_WindowData;
dludwig@8522
   272
    if (!data) {
dludwig@8522
   273
        SDL_OutOfMemory();
dludwig@8522
   274
        return -1;
dludwig@8522
   275
    }
dludwig@8522
   276
    window->driverdata = data;
dludwig@8522
   277
    data->sdlWindow = window;
dludwig@8522
   278
dludwig@8522
   279
    /* To note, when XAML support is enabled, access to the CoreWindow will not
dludwig@8522
   280
       be possible, at least not via the SDL/XAML thread.  Attempts to access it
dludwig@8522
   281
       from there will throw exceptions.  As such, the SDL_WindowData's
dludwig@8522
   282
       'coreWindow' field will only be set (to a non-null value) if XAML isn't
dludwig@8522
   283
       enabled.
dludwig@8522
   284
    */
dludwig@8522
   285
    if (!WINRT_XAMLWasEnabled) {
dludwig@8522
   286
        data->coreWindow = CoreWindow::GetForCurrentThread();
dludwig@8522
   287
    }
dludwig@8522
   288
dludwig@8541
   289
#if SDL_VIDEO_OPENGL_EGL
dludwig@8541
   290
    /* Setup the EGL surface, but only if OpenGL ES 2 was requested. */
dludwig@8541
   291
    if (!(window->flags & SDL_WINDOW_OPENGL)) {
dludwig@8541
   292
        /* OpenGL ES 2 wasn't requested.  Don't set up an EGL surface. */
dludwig@8541
   293
        data->egl_surface = EGL_NO_SURFACE;
dludwig@8541
   294
    } else {
dludwig@8541
   295
        /* OpenGL ES 2 was reuqested.  Set up an EGL surface. */
dludwig@8572
   296
dludwig@8572
   297
        /* HACK: ANGLE/WinRT currently uses non-pointer, C++ objects to represent
dludwig@8572
   298
           native windows.  The object only contains a single pointer to a COM
dludwig@8572
   299
           interface pointer, which on x86 appears to be castable to the object
dludwig@8572
   300
           without apparant problems.  On other platforms, notable ARM and x64,
dludwig@8572
   301
           doing so will cause a crash.  To avoid this crash, we'll bypass
dludwig@8572
   302
           SDL's normal call to eglCreateWindowSurface, which is invoked from C
dludwig@8572
   303
           code, and call it here, where an appropriate C++ object may be
dludwig@8572
   304
           passed in.
dludwig@8572
   305
         */
dludwig@8572
   306
        typedef EGLSurface (*eglCreateWindowSurfaceFunction)(EGLDisplay dpy, EGLConfig config,
dludwig@8572
   307
            Microsoft::WRL::ComPtr<IUnknown> win,
dludwig@8572
   308
            const EGLint *attrib_list);
dludwig@8572
   309
        eglCreateWindowSurfaceFunction WINRT_eglCreateWindowSurface =
dludwig@8572
   310
            (eglCreateWindowSurfaceFunction) _this->egl_data->eglCreateWindowSurface;
dludwig@8572
   311
dludwig@8572
   312
        Microsoft::WRL::ComPtr<IUnknown> nativeWindow = reinterpret_cast<IUnknown *>(data->coreWindow.Get());
dludwig@8572
   313
        data->egl_surface = WINRT_eglCreateWindowSurface(
dludwig@8572
   314
            _this->egl_data->egl_display,
dludwig@8572
   315
            _this->egl_data->egl_config,
dludwig@8572
   316
            nativeWindow, NULL);
dludwig@8541
   317
        if (data->egl_surface == NULL) {
dludwig@8574
   318
            // TODO, WinRT: see if eglCreateWindowSurface, or its callee(s), sets an error message.  If so, attach it to the SDL error.
dludwig@8574
   319
            return SDL_SetError("eglCreateWindowSurface failed");
dludwig@8541
   320
        }
dludwig@8541
   321
    }
dludwig@8541
   322
#endif
dludwig@8541
   323
dludwig@8522
   324
    /* Make sure the window is considered to be positioned at {0,0},
dludwig@8522
   325
       and is considered fullscreen, shown, and the like.
dludwig@8522
   326
    */
dludwig@8522
   327
    window->x = 0;
dludwig@8522
   328
    window->y = 0;
dludwig@8522
   329
    window->flags =
dludwig@8522
   330
        SDL_WINDOW_FULLSCREEN |
dludwig@8522
   331
        SDL_WINDOW_SHOWN |
dludwig@8522
   332
        SDL_WINDOW_BORDERLESS |
dludwig@8522
   333
        SDL_WINDOW_MAXIMIZED |
dludwig@8522
   334
        SDL_WINDOW_INPUT_GRABBED;
dludwig@8522
   335
dludwig@8541
   336
#if SDL_VIDEO_OPENGL_EGL
dludwig@8541
   337
    if (data->egl_surface) {
dludwig@8541
   338
        window->flags |= SDL_WINDOW_OPENGL;
dludwig@8541
   339
    }
dludwig@8541
   340
#endif
dludwig@8541
   341
dludwig@8522
   342
    /* WinRT does not, as of this writing, appear to support app-adjustable
dludwig@8522
   343
       window sizes.  Set the window size to whatever the native WinRT
dludwig@8522
   344
       CoreWindow is set at.
dludwig@8522
   345
dludwig@8522
   346
       TODO, WinRT: if and when non-fullscreen XAML control support is added to SDL, consider making those resizable via SDL_Window's interfaces.
dludwig@8522
   347
    */
dludwig@8522
   348
    window->w = _this->displays[0].current_mode.w;
dludwig@8522
   349
    window->h = _this->displays[0].current_mode.h;
dludwig@8551
   350
dludwig@8551
   351
    /* For now, treat WinRT apps as if they always have focus.
dludwig@8551
   352
       TODO, WinRT: try tracking keyboard and mouse focus state with respect to snapped apps
dludwig@8551
   353
     */
dludwig@8551
   354
    SDL_SetMouseFocus(window);
dludwig@8551
   355
    SDL_SetKeyboardFocus(window);
dludwig@8522
   356
 
dludwig@8522
   357
    /* Make sure the WinRT app's IFramworkView can post events on
dludwig@8522
   358
       behalf of SDL:
dludwig@8522
   359
    */
dludwig@8522
   360
    WINRT_GlobalSDLWindow = window;
dludwig@8522
   361
dludwig@8522
   362
    /* All done! */
dludwig@8522
   363
    return 0;
dludwig@8522
   364
}
dludwig@8522
   365
dludwig@8333
   366
void
dludwig@8333
   367
WINRT_DestroyWindow(_THIS, SDL_Window * window)
dludwig@8333
   368
{
dludwig@8411
   369
    SDL_WindowData * data = (SDL_WindowData *) window->driverdata;
dludwig@8411
   370
dludwig@8497
   371
    if (WINRT_GlobalSDLWindow == window) {
dludwig@8497
   372
        WINRT_GlobalSDLWindow = NULL;
dludwig@8424
   373
    }
dludwig@8424
   374
dludwig@8411
   375
    if (data) {
dludwig@8411
   376
        // Delete the internal window data:
dludwig@8411
   377
        delete data;
dludwig@8411
   378
        data = NULL;
dludwig@8411
   379
    }
dludwig@8333
   380
}
dludwig@8333
   381
dludwig@8522
   382
SDL_bool
dludwig@8522
   383
WINRT_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
dludwig@8522
   384
{
dludwig@8522
   385
    SDL_WindowData * data = (SDL_WindowData *) window->driverdata;
dludwig@8522
   386
dludwig@8522
   387
    if (info->version.major <= SDL_MAJOR_VERSION) {
dludwig@8522
   388
        info->subsystem = SDL_SYSWM_WINRT;
dludwig@8527
   389
        info->info.winrt.window = reinterpret_cast<IInspectable *>(data->coreWindow.Get());
dludwig@8522
   390
        return SDL_TRUE;
dludwig@8522
   391
    } else {
dludwig@8522
   392
        SDL_SetError("Application not compiled with SDL %d.%d\n",
dludwig@8522
   393
                     SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
dludwig@8522
   394
        return SDL_FALSE;
dludwig@8522
   395
    }
dludwig@8522
   396
    return SDL_FALSE;
dludwig@8411
   397
}
dludwig@8333
   398
dludwig@8327
   399
#endif /* SDL_VIDEO_DRIVER_WINRT */
dludwig@8327
   400
dludwig@8327
   401
/* vi: set ts=4 sw=4 expandtab: */