Removed a bunch of unnecessary #ifdefs.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 26 Feb 2017 00:40:04 -0500
changeset 10914ebc7ff92677d
parent 10913 a02b673351cc
child 10915 4d6e2e2c4912
Removed a bunch of unnecessary #ifdefs.
src/power/SDL_syspower.h
src/power/haiku/SDL_syspower.c
src/render/SDL_sysrender.h
src/video/SDL_sysvideo.h
     1.1 --- a/src/power/SDL_syspower.h	Sun Feb 26 00:12:33 2017 -0500
     1.2 +++ b/src/power/SDL_syspower.h	Sun Feb 26 00:40:04 2017 -0500
     1.3 @@ -27,41 +27,19 @@
     1.4  
     1.5  #include "SDL_power.h"
     1.6  
     1.7 -#ifndef SDL_POWER_DISABLED
     1.8 -#ifdef SDL_POWER_LINUX          /* in order of preference. More than could work. */
     1.9 +/* Not all of these are available in a given build. Use #ifdefs, etc. */
    1.10  SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *, int *, int *);
    1.11  SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *);
    1.12  SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *);
    1.13 -#endif
    1.14 -#ifdef SDL_POWER_WINDOWS        /* handles Win32, Win64, PocketPC. */
    1.15  SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *);
    1.16 -#endif
    1.17 -#ifdef SDL_POWER_UIKIT          /* handles iPhone/iPad/etc */
    1.18  SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *);
    1.19 -#endif
    1.20 -#ifdef SDL_POWER_MACOSX         /* handles Mac OS X, Darwin. */
    1.21  SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *);
    1.22 -#endif
    1.23 -#ifdef SDL_POWER_HAIKU          /* with BeOS euc.jp apm driver. Does this work on Haiku? */
    1.24  SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *);
    1.25 -#endif
    1.26 -#ifdef SDL_POWER_ANDROID        /* handles Android. */
    1.27  SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *);
    1.28 -#endif
    1.29 -#ifdef SDL_POWER_PSP        /* handles PSP. */
    1.30  SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *);
    1.31 -#endif
    1.32 -#ifdef SDL_POWER_WINRT          /* handles WinRT */
    1.33  SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState *, int *, int *);
    1.34 -#endif
    1.35 -#ifdef SDL_POWER_EMSCRIPTEN     /* handles Emscripten */
    1.36  SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *);
    1.37 -#endif
    1.38 -
    1.39 -#ifdef SDL_POWER_HARDWIRED
    1.40  SDL_bool SDL_GetPowerInfo_Hardwired(SDL_PowerState *, int *, int *);
    1.41 -#endif
    1.42 -#endif
    1.43  
    1.44  #endif /* SDL_syspower_h_ */
    1.45  
     2.1 --- a/src/power/haiku/SDL_syspower.c	Sun Feb 26 00:12:33 2017 -0500
     2.2 +++ b/src/power/haiku/SDL_syspower.c	Sun Feb 26 00:40:04 2017 -0500
     2.3 @@ -20,7 +20,9 @@
     2.4  */
     2.5  #include "../../SDL_internal.h"
     2.6  
     2.7 +/* uses BeOS euc.jp apm driver. */
     2.8  /* !!! FIXME: does this thing even work on Haiku? */
     2.9 +
    2.10  #ifndef SDL_POWER_DISABLED
    2.11  #if SDL_POWER_HAIKU
    2.12  
     3.1 --- a/src/render/SDL_sysrender.h	Sun Feb 26 00:12:33 2017 -0500
     3.2 +++ b/src/render/SDL_sysrender.h	Sun Feb 26 00:40:04 2017 -0500
     3.3 @@ -173,33 +173,16 @@
     3.4      SDL_RendererInfo info;
     3.5  };
     3.6  
     3.7 -#if !SDL_RENDER_DISABLED
     3.8 -
     3.9 -#if SDL_VIDEO_RENDER_D3D
    3.10 +/* Not all of these are available in a given build. Use #ifdefs, etc. */
    3.11  extern SDL_RenderDriver D3D_RenderDriver;
    3.12 -#endif
    3.13 -#if SDL_VIDEO_RENDER_D3D11
    3.14  extern SDL_RenderDriver D3D11_RenderDriver;
    3.15 -#endif
    3.16 -#if SDL_VIDEO_RENDER_OGL
    3.17  extern SDL_RenderDriver GL_RenderDriver;
    3.18 -#endif
    3.19 -#if SDL_VIDEO_RENDER_OGL_ES2
    3.20  extern SDL_RenderDriver GLES2_RenderDriver;
    3.21 -#endif
    3.22 -#if SDL_VIDEO_RENDER_OGL_ES
    3.23  extern SDL_RenderDriver GLES_RenderDriver;
    3.24 -#endif
    3.25 -#if SDL_VIDEO_RENDER_DIRECTFB
    3.26  extern SDL_RenderDriver DirectFB_RenderDriver;
    3.27 -#endif
    3.28 -#if SDL_VIDEO_RENDER_PSP
    3.29  extern SDL_RenderDriver PSP_RenderDriver;
    3.30 -#endif
    3.31  extern SDL_RenderDriver SW_RenderDriver;
    3.32  
    3.33 -#endif /* !SDL_RENDER_DISABLED */
    3.34 -
    3.35  #endif /* SDL_sysrender_h_ */
    3.36  
    3.37  /* vi: set ts=4 sw=4 expandtab: */
     4.1 --- a/src/video/SDL_sysvideo.h	Sun Feb 26 00:12:33 2017 -0500
     4.2 +++ b/src/video/SDL_sysvideo.h	Sun Feb 26 00:40:04 2017 -0500
     4.3 @@ -372,57 +372,24 @@
     4.4      SDL_VideoDevice *(*create) (int devindex);
     4.5  } VideoBootStrap;
     4.6  
     4.7 -#if SDL_VIDEO_DRIVER_COCOA
     4.8 +/* Not all of these are available in a given build. Use #ifdefs, etc. */
     4.9  extern VideoBootStrap COCOA_bootstrap;
    4.10 -#endif
    4.11 -#if SDL_VIDEO_DRIVER_X11
    4.12  extern VideoBootStrap X11_bootstrap;
    4.13 -#endif
    4.14 -#if SDL_VIDEO_DRIVER_MIR
    4.15  extern VideoBootStrap MIR_bootstrap;
    4.16 -#endif
    4.17 -#if SDL_VIDEO_DRIVER_DIRECTFB
    4.18  extern VideoBootStrap DirectFB_bootstrap;
    4.19 -#endif
    4.20 -#if SDL_VIDEO_DRIVER_WINDOWS
    4.21  extern VideoBootStrap WINDOWS_bootstrap;
    4.22 -#endif
    4.23 -#if SDL_VIDEO_DRIVER_WINRT
    4.24  extern VideoBootStrap WINRT_bootstrap;
    4.25 -#endif
    4.26 -#if SDL_VIDEO_DRIVER_HAIKU
    4.27  extern VideoBootStrap HAIKU_bootstrap;
    4.28 -#endif
    4.29 -#if SDL_VIDEO_DRIVER_PANDORA
    4.30  extern VideoBootStrap PND_bootstrap;
    4.31 -#endif
    4.32 -#if SDL_VIDEO_DRIVER_UIKIT
    4.33  extern VideoBootStrap UIKIT_bootstrap;
    4.34 -#endif
    4.35 -#if SDL_VIDEO_DRIVER_ANDROID
    4.36  extern VideoBootStrap Android_bootstrap;
    4.37 -#endif
    4.38 -#if SDL_VIDEO_DRIVER_PSP
    4.39  extern VideoBootStrap PSP_bootstrap;
    4.40 -#endif
    4.41 -#if SDL_VIDEO_DRIVER_RPI
    4.42  extern VideoBootStrap RPI_bootstrap;
    4.43 -#endif
    4.44 -#if SDL_VIDEO_DRIVER_DUMMY
    4.45  extern VideoBootStrap DUMMY_bootstrap;
    4.46 -#endif
    4.47 -#if SDL_VIDEO_DRIVER_WAYLAND
    4.48  extern VideoBootStrap Wayland_bootstrap;
    4.49 -#endif
    4.50 -#if SDL_VIDEO_DRIVER_NACL
    4.51  extern VideoBootStrap NACL_bootstrap;
    4.52 -#endif
    4.53 -#if SDL_VIDEO_DRIVER_VIVANTE
    4.54  extern VideoBootStrap VIVANTE_bootstrap;
    4.55 -#endif
    4.56 -#if SDL_VIDEO_DRIVER_EMSCRIPTEN
    4.57  extern VideoBootStrap Emscripten_bootstrap;
    4.58 -#endif
    4.59  
    4.60  extern SDL_VideoDevice *SDL_GetVideoDevice(void);
    4.61  extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);