src/video/SDL_video.c
changeset 10609 d702ecbd8ba7
parent 10499 363c1c7e7a41
child 10650 b6ec7005ca15
     1.1 --- a/src/video/SDL_video.c	Sun Nov 13 00:09:02 2016 -0800
     1.2 +++ b/src/video/SDL_video.c	Sun Nov 13 22:57:41 2016 -0800
     1.3 @@ -46,9 +46,11 @@
     1.4  #include "SDL_opengles2.h"
     1.5  #endif /* SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL */
     1.6  
     1.7 +#if !SDL_VIDEO_OPENGL
     1.8  #ifndef GL_CONTEXT_RELEASE_BEHAVIOR_KHR
     1.9  #define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
    1.10  #endif
    1.11 +#endif
    1.12  
    1.13  /* On Windows, windows.h defines CreateWindow */
    1.14  #ifdef CreateWindow
    1.15 @@ -3617,8 +3619,9 @@
    1.16  #include "x11/SDL_x11messagebox.h"
    1.17  #endif
    1.18  
    1.19 -// This function will be unused if none of the above video drivers are present.
    1.20 -SDL_UNUSED static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
    1.21 +
    1.22 +#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT || SDL_VIDEO_DRIVER_COCOA || SDL_VIDEO_DRIVER_UIKIT || SDL_VIDEO_DRIVER_X11
    1.23 +static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
    1.24  {
    1.25      SDL_SysWMinfo info;
    1.26      SDL_Window *window = messageboxdata->window;
    1.27 @@ -3634,6 +3637,7 @@
    1.28          return (info.subsystem == drivertype);
    1.29      }
    1.30  }
    1.31 +#endif
    1.32  
    1.33  int
    1.34  SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)