# HG changeset patch # User Sam Lantinga # Date 1295919498 28800 # Node ID 455bc74f70341d4291faff69999b3e1ffbd99427 # Parent b4b0e9f1669c61bbb16f1605c7c5fe1826fda611 Fixed bug #1100 Test the video features with #if instead of #ifdef diff -r b4b0e9f1669c -r 455bc74f7034 include/SDL_config_macosx.h --- a/include/SDL_config_macosx.h Mon Jan 24 16:10:13 2011 -0800 +++ b/include/SDL_config_macosx.h Mon Jan 24 17:38:18 2011 -0800 @@ -148,13 +148,23 @@ #define SDL_VIDEO_DRIVER_X11_XV 1 #define SDL_VIDEO_DRIVER_X11_XSHAPE 1 +#ifndef SDL_VIDEO_RENDER_OGL #define SDL_VIDEO_RENDER_OGL 1 +#endif +#ifndef SDL_VIDEO_RENDER_X11 #define SDL_VIDEO_RENDER_X11 1 +#endif /* Enable OpenGL support */ +#ifndef SDL_VIDEO_OPENGL #define SDL_VIDEO_OPENGL 1 +#endif +#ifndef SDL_VIDEO_OPENGL_CGL #define SDL_VIDEO_OPENGL_CGL 1 +#endif +#ifndef SDL_VIDEO_OPENGL_GLX #define SDL_VIDEO_OPENGL_GLX 1 +#endif /* Enable system power support */ #define SDL_POWER_MACOSX 1 diff -r b4b0e9f1669c -r 455bc74f7034 include/SDL_config_windows.h --- a/include/SDL_config_windows.h Mon Jan 24 16:10:13 2011 -0800 +++ b/include/SDL_config_windows.h Mon Jan 24 17:38:18 2011 -0800 @@ -179,18 +179,30 @@ #define SDL_VIDEO_DRIVER_WINDOWS 1 #ifdef _WIN32_WCE +#ifndef SDL_VIDEO_RENDER_GAPI #define SDL_VIDEO_RENDER_GAPI 1 +#endif #else +#ifndef SDL_VIDEO_RENDER_D3D #define SDL_VIDEO_RENDER_D3D 1 #endif +#endif +#ifndef SDL_VIDEO_RENDER_GDI #define SDL_VIDEO_RENDER_GDI 1 +#endif /* Enable OpenGL support */ #ifndef _WIN32_WCE +#ifndef SDL_VIDEO_OPENGL #define SDL_VIDEO_OPENGL 1 +#endif +#ifndef SDL_VIDEO_OPENGL_WGL #define SDL_VIDEO_OPENGL_WGL 1 +#endif +#ifndef SDL_VIDEO_RENDER_OGL #define SDL_VIDEO_RENDER_OGL 1 #endif +#endif /* Enable system power support */ #define SDL_POWER_WINDOWS 1 diff -r b4b0e9f1669c -r 455bc74f7034 src/video/cocoa/SDL_cocoavideo.m --- a/src/video/cocoa/SDL_cocoavideo.m Mon Jan 24 16:10:13 2011 -0800 +++ b/src/video/cocoa/SDL_cocoavideo.m Mon Jan 24 17:38:18 2011 -0800 @@ -98,7 +98,7 @@ device->shape_driver.SetWindowShape = Cocoa_SetWindowShape; device->shape_driver.ResizeWindowShape = Cocoa_ResizeWindowShape; -#ifdef SDL_VIDEO_OPENGL_CGL +#if SDL_VIDEO_OPENGL_CGL device->GL_LoadLibrary = Cocoa_GL_LoadLibrary; device->GL_GetProcAddress = Cocoa_GL_GetProcAddress; device->GL_UnloadLibrary = Cocoa_GL_UnloadLibrary; diff -r b4b0e9f1669c -r 455bc74f7034 src/video/windows/SDL_windowsvideo.c --- a/src/video/windows/SDL_windowsvideo.c Mon Jan 24 16:10:13 2011 -0800 +++ b/src/video/windows/SDL_windowsvideo.c Mon Jan 24 17:38:18 2011 -0800 @@ -197,7 +197,7 @@ device->shape_driver.SetWindowShape = Win32_SetWindowShape; device->shape_driver.ResizeWindowShape = Win32_ResizeWindowShape; -#ifdef SDL_VIDEO_OPENGL_WGL +#if SDL_VIDEO_OPENGL_WGL device->GL_LoadLibrary = WIN_GL_LoadLibrary; device->GL_GetProcAddress = WIN_GL_GetProcAddress; device->GL_UnloadLibrary = WIN_GL_UnloadLibrary; diff -r b4b0e9f1669c -r 455bc74f7034 src/video/windows/SDL_windowswindow.c --- a/src/video/windows/SDL_windowswindow.c Mon Jan 24 16:10:13 2011 -0800 +++ b/src/video/windows/SDL_windowswindow.c Mon Jan 24 17:38:18 2011 -0800 @@ -243,7 +243,7 @@ DestroyWindow(hwnd); return -1; } -#ifdef SDL_VIDEO_OPENGL_WGL +#if SDL_VIDEO_OPENGL_WGL if (window->flags & SDL_WINDOW_OPENGL) { if (WIN_GL_SetupWindow(_this, window) < 0) { WIN_DestroyWindow(_this, window); diff -r b4b0e9f1669c -r 455bc74f7034 src/video/x11/SDL_x11video.c --- a/src/video/x11/SDL_x11video.c Mon Jan 24 16:10:13 2011 -0800 +++ b/src/video/x11/SDL_x11video.c Mon Jan 24 17:38:18 2011 -0800 @@ -209,7 +209,7 @@ device->shape_driver.CreateShaper = X11_CreateShaper; device->shape_driver.SetWindowShape = X11_SetWindowShape; device->shape_driver.ResizeWindowShape = X11_ResizeWindowShape; -#ifdef SDL_VIDEO_OPENGL_GLX +#if SDL_VIDEO_OPENGL_GLX device->GL_LoadLibrary = X11_GL_LoadLibrary; device->GL_GetProcAddress = X11_GL_GetProcAddress; device->GL_UnloadLibrary = X11_GL_UnloadLibrary; diff -r b4b0e9f1669c -r 455bc74f7034 src/video/x11/SDL_x11window.c --- a/src/video/x11/SDL_x11window.c Mon Jan 24 16:10:13 2011 -0800 +++ b/src/video/x11/SDL_x11window.c Mon Jan 24 17:38:18 2011 -0800 @@ -288,7 +288,7 @@ } */ #endif -#ifdef SDL_VIDEO_OPENGL_GLX +#if SDL_VIDEO_OPENGL_GLX if (window->flags & SDL_WINDOW_OPENGL) { XVisualInfo *vinfo;