From 2c53f30fcda92a19596aaa6ce58ea489a840864a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 23 Jul 2003 21:19:43 +0000 Subject: [PATCH] make renderer type available to StepMania.cpp --- stepmania/src/arch/arch.h | 13 +++++++++++++ stepmania/src/arch/arch_Win32.h | 1 - stepmania/src/arch/arch_default.h | 11 +++++------ stepmania/src/arch/arch_xbox.h | 2 -- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/stepmania/src/arch/arch.h b/stepmania/src/arch/arch.h index 2d484863a7..188025bc39 100644 --- a/stepmania/src/arch/arch.h +++ b/stepmania/src/arch/arch.h @@ -17,6 +17,10 @@ LowLevelWindow *MakeLowLevelWindow(); void MakeInputHandlers(vector &Add); RageSoundDriver *MakeRageSoundDriver(CString drivers); +/* These definitions are in here, instead of in arch_*.h, because they + * need to be available to other modules. It'd be overkill to create separate + * "config" and "driver" headers for each arch. */ + /* Define the default list of sound drivers for each arch. It's * OK to list drivers that may not be available. */ #if defined(LINUX) @@ -31,6 +35,15 @@ RageSoundDriver *MakeRageSoundDriver(CString drivers); #define DEFAULT_SOUND_DRIVER_LIST "Null" #endif +/* Choose your renderers. */ +#if defined(_WINDOWS) +#define SUPPORT_OPENGL +#define SUPPORT_D3D +#elif defined(_XBOX) +#define SUPPORT_D3D +#else +#define SUPPORT_OPENGL +#endif /* Hack for Xbox: All paths must be absolute. */ #if defined(_XBOX) diff --git a/stepmania/src/arch/arch_Win32.h b/stepmania/src/arch/arch_Win32.h index bfe34ec265..f5548fc543 100644 --- a/stepmania/src/arch/arch_Win32.h +++ b/stepmania/src/arch/arch_Win32.h @@ -14,7 +14,6 @@ #include "Sound/RageSoundDriver_DSound_Software.h" #include "Sound/RageSoundDriver_WaveOut.h" -#define SUPPORT_D3D #undef SUPPORT_SDL_INPUT #endif diff --git a/stepmania/src/arch/arch_default.h b/stepmania/src/arch/arch_default.h index 214c660e3e..d3388e945c 100644 --- a/stepmania/src/arch/arch_default.h +++ b/stepmania/src/arch/arch_default.h @@ -14,12 +14,10 @@ * For Xbox, let's leave this file alone, and special case stuff in arch_xbox.h. * * For LowLevelWindow, just undefine SUPPORT_OPENGL and don't link any LLW at - * all. (We'll still include the header here, but it'll never be used.) We - * can remove LowLevelWindow_Null, but I'll wait for you to confirm that there - * aren't any strange problems with this before doing that. + * all. * For InputHandler, undef SUPPORT_SDL_INPUT and we won't create the SDL input - * handler. + * handler. (We'll still include the header here, but it'll never be used.) */ /* We can have any number of input drivers. By default, use SDL for keyboards @@ -36,9 +34,10 @@ #include "ErrorDialog/ErrorDialog_null.h" #include "ArchHooks/ArchHooks_none.h" #include "Sound/RageSoundDriver_Null.h" -#include "LowLevelWindow/LowLevelWindow_SDL.h" -#define SUPPORT_OPENGL +#if defined(SUPPORT_OPENGL) +#include "LowLevelWindow/LowLevelWindow_SDL.h" +#endif #endif diff --git a/stepmania/src/arch/arch_xbox.h b/stepmania/src/arch/arch_xbox.h index 8cc950850d..41c9005012 100644 --- a/stepmania/src/arch/arch_xbox.h +++ b/stepmania/src/arch/arch_xbox.h @@ -11,8 +11,6 @@ #include "Sound/RageSoundDriver_DSound.h" -#define SUPPORT_D3D -#undef SUPPORT_OPENGL /* Undef this if you need no SDL input. */ // #undef SUPPORT_SDL_INPUT