Commit 065e4e3f authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #1100

Test the video features with #if instead of #ifdef
parent d5b9e967
...@@ -148,13 +148,23 @@ ...@@ -148,13 +148,23 @@
#define SDL_VIDEO_DRIVER_X11_XV 1 #define SDL_VIDEO_DRIVER_X11_XV 1
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1 #define SDL_VIDEO_DRIVER_X11_XSHAPE 1
#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 1 #define SDL_VIDEO_RENDER_OGL 1
#endif
#ifndef SDL_VIDEO_RENDER_X11
#define SDL_VIDEO_RENDER_X11 1 #define SDL_VIDEO_RENDER_X11 1
#endif
/* Enable OpenGL support */ /* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
#define SDL_VIDEO_OPENGL 1 #define SDL_VIDEO_OPENGL 1
#endif
#ifndef SDL_VIDEO_OPENGL_CGL
#define SDL_VIDEO_OPENGL_CGL 1 #define SDL_VIDEO_OPENGL_CGL 1
#endif
#ifndef SDL_VIDEO_OPENGL_GLX
#define SDL_VIDEO_OPENGL_GLX 1 #define SDL_VIDEO_OPENGL_GLX 1
#endif
/* Enable system power support */ /* Enable system power support */
#define SDL_POWER_MACOSX 1 #define SDL_POWER_MACOSX 1
......
...@@ -179,18 +179,30 @@ typedef unsigned int uintptr_t; ...@@ -179,18 +179,30 @@ typedef unsigned int uintptr_t;
#define SDL_VIDEO_DRIVER_WINDOWS 1 #define SDL_VIDEO_DRIVER_WINDOWS 1
#ifdef _WIN32_WCE #ifdef _WIN32_WCE
#ifndef SDL_VIDEO_RENDER_GAPI
#define SDL_VIDEO_RENDER_GAPI 1 #define SDL_VIDEO_RENDER_GAPI 1
#endif
#else #else
#ifndef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 1 #define SDL_VIDEO_RENDER_D3D 1
#endif #endif
#endif
#ifndef SDL_VIDEO_RENDER_GDI
#define SDL_VIDEO_RENDER_GDI 1 #define SDL_VIDEO_RENDER_GDI 1
#endif
/* Enable OpenGL support */ /* Enable OpenGL support */
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
#ifndef SDL_VIDEO_OPENGL
#define SDL_VIDEO_OPENGL 1 #define SDL_VIDEO_OPENGL 1
#endif
#ifndef SDL_VIDEO_OPENGL_WGL
#define SDL_VIDEO_OPENGL_WGL 1 #define SDL_VIDEO_OPENGL_WGL 1
#endif
#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 1 #define SDL_VIDEO_RENDER_OGL 1
#endif #endif
#endif
/* Enable system power support */ /* Enable system power support */
#define SDL_POWER_WINDOWS 1 #define SDL_POWER_WINDOWS 1
......
...@@ -98,7 +98,7 @@ Cocoa_CreateDevice(int devindex) ...@@ -98,7 +98,7 @@ Cocoa_CreateDevice(int devindex)
device->shape_driver.SetWindowShape = Cocoa_SetWindowShape; device->shape_driver.SetWindowShape = Cocoa_SetWindowShape;
device->shape_driver.ResizeWindowShape = Cocoa_ResizeWindowShape; device->shape_driver.ResizeWindowShape = Cocoa_ResizeWindowShape;
#ifdef SDL_VIDEO_OPENGL_CGL #if SDL_VIDEO_OPENGL_CGL
device->GL_LoadLibrary = Cocoa_GL_LoadLibrary; device->GL_LoadLibrary = Cocoa_GL_LoadLibrary;
device->GL_GetProcAddress = Cocoa_GL_GetProcAddress; device->GL_GetProcAddress = Cocoa_GL_GetProcAddress;
device->GL_UnloadLibrary = Cocoa_GL_UnloadLibrary; device->GL_UnloadLibrary = Cocoa_GL_UnloadLibrary;
......
...@@ -197,7 +197,7 @@ WIN_CreateDevice(int devindex) ...@@ -197,7 +197,7 @@ WIN_CreateDevice(int devindex)
device->shape_driver.SetWindowShape = Win32_SetWindowShape; device->shape_driver.SetWindowShape = Win32_SetWindowShape;
device->shape_driver.ResizeWindowShape = Win32_ResizeWindowShape; device->shape_driver.ResizeWindowShape = Win32_ResizeWindowShape;
#ifdef SDL_VIDEO_OPENGL_WGL #if SDL_VIDEO_OPENGL_WGL
device->GL_LoadLibrary = WIN_GL_LoadLibrary; device->GL_LoadLibrary = WIN_GL_LoadLibrary;
device->GL_GetProcAddress = WIN_GL_GetProcAddress; device->GL_GetProcAddress = WIN_GL_GetProcAddress;
device->GL_UnloadLibrary = WIN_GL_UnloadLibrary; device->GL_UnloadLibrary = WIN_GL_UnloadLibrary;
......
...@@ -243,7 +243,7 @@ WIN_CreateWindow(_THIS, SDL_Window * window) ...@@ -243,7 +243,7 @@ WIN_CreateWindow(_THIS, SDL_Window * window)
DestroyWindow(hwnd); DestroyWindow(hwnd);
return -1; return -1;
} }
#ifdef SDL_VIDEO_OPENGL_WGL #if SDL_VIDEO_OPENGL_WGL
if (window->flags & SDL_WINDOW_OPENGL) { if (window->flags & SDL_WINDOW_OPENGL) {
if (WIN_GL_SetupWindow(_this, window) < 0) { if (WIN_GL_SetupWindow(_this, window) < 0) {
WIN_DestroyWindow(_this, window); WIN_DestroyWindow(_this, window);
......
...@@ -209,7 +209,7 @@ X11_CreateDevice(int devindex) ...@@ -209,7 +209,7 @@ X11_CreateDevice(int devindex)
device->shape_driver.CreateShaper = X11_CreateShaper; device->shape_driver.CreateShaper = X11_CreateShaper;
device->shape_driver.SetWindowShape = X11_SetWindowShape; device->shape_driver.SetWindowShape = X11_SetWindowShape;
device->shape_driver.ResizeWindowShape = X11_ResizeWindowShape; device->shape_driver.ResizeWindowShape = X11_ResizeWindowShape;
#ifdef SDL_VIDEO_OPENGL_GLX #if SDL_VIDEO_OPENGL_GLX
device->GL_LoadLibrary = X11_GL_LoadLibrary; device->GL_LoadLibrary = X11_GL_LoadLibrary;
device->GL_GetProcAddress = X11_GL_GetProcAddress; device->GL_GetProcAddress = X11_GL_GetProcAddress;
device->GL_UnloadLibrary = X11_GL_UnloadLibrary; device->GL_UnloadLibrary = X11_GL_UnloadLibrary;
......
...@@ -288,7 +288,7 @@ X11_CreateWindow(_THIS, SDL_Window * window) ...@@ -288,7 +288,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
} }
*/ */
#endif #endif
#ifdef SDL_VIDEO_OPENGL_GLX #if SDL_VIDEO_OPENGL_GLX
if (window->flags & SDL_WINDOW_OPENGL) { if (window->flags & SDL_WINDOW_OPENGL) {
XVisualInfo *vinfo; XVisualInfo *vinfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment