Thorough(!) remodeling of the arch/ directory and the contents therein; fixed link-time warnings on GCC and should make things a lot easier to manage. A pile of other random things too, mostly cleanups and getting things to work with the remodeled arch/ directory.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include "NoteTypes.h"
|
||||
#include "Steps.h"
|
||||
#include "DancingCharacters.h"
|
||||
#include "arch/arch.h"
|
||||
#include "BeginnerHelper.h"
|
||||
#include "StatsManager.h"
|
||||
#include "ScreenDimensions.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "Foreach.h"
|
||||
#include "RageDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "Bookkeeper.h"
|
||||
#include "RageUtil.h"
|
||||
#include "arch/arch.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageLog.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "Character.h"
|
||||
#include "IniFile.h"
|
||||
#include "RageUtil.h"
|
||||
#include "arch/arch.h"
|
||||
|
||||
|
||||
bool Character::Load( CString sCharDir )
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "Steps.h"
|
||||
#include "BannerCache.h"
|
||||
#include "RageFile.h"
|
||||
#include "arch/arch.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ProfileManager.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "UnlockManager.h"
|
||||
#include "AnnouncerManager.h"
|
||||
#include "ProfileManager.h"
|
||||
#include "arch/arch.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "LightsManager.h"
|
||||
#include "RageFile.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "RageUtil.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageInput.h"
|
||||
#include "arch/arch.h"
|
||||
#include "Game.h"
|
||||
#include "Style.h"
|
||||
|
||||
|
||||
@@ -100,14 +100,16 @@ StepMania = StdString.h \
|
||||
StepMania.cpp StepMania.h \
|
||||
global.cpp global.h
|
||||
|
||||
LoadingWindow = arch/LoadingWindow/LoadingWindow_Null.h
|
||||
LoadingWindow = arch/LoadingWindow/LoadingWindow.h arch/LoadingWindow/LoadingWindow.cpp \
|
||||
arch/LoadingWindow/LoadingWindow_Null.h
|
||||
|
||||
if HAVE_GTK
|
||||
LoadingWindow += arch/LoadingWindow/LoadingWindow_Gtk.cpp arch/LoadingWindow/LoadingWindow_Gtk.h
|
||||
endif
|
||||
|
||||
Sound = arch/Sound/RageSoundDriver_Null.cpp arch/Sound/RageSoundDriver_Null.h \
|
||||
arch/Sound/RageSoundDriver_Generic_Software.cpp arch/Sound/RageSoundDriver_Generic_Software.h
|
||||
Sound = arch/Sound/RageSoundDriver.h arch/Sound/RageSoundDriver.cpp \
|
||||
arch/Sound/RageSoundDriver_Null.cpp arch/Sound/RageSoundDriver_Null.h \
|
||||
arch/Sound/RageSoundDriver_Generic_Software.cpp arch/Sound/RageSoundDriver_Generic_Software.h
|
||||
|
||||
|
||||
if HAVE_OSS
|
||||
@@ -141,7 +143,7 @@ Lights = arch/Lights/LightsDriver.cpp arch/Lights/LightsDriver.h \
|
||||
arch/Lights/LightsDriver_SystemMessage.cpp arch/Lights/LightsDriver_SystemMessage.h
|
||||
|
||||
MemoryCard = arch/MemoryCard/MemoryCardDriver.cpp arch/MemoryCard/MemoryCardDriver.h
|
||||
LowLevelWindow = arch/LowLevelWindow/LowLevelWindow.h
|
||||
LowLevelWindow = arch/LowLevelWindow/LowLevelWindow.h arch/LowLevelWindow/LowLevelWindow.cpp
|
||||
|
||||
ArchUtils =
|
||||
|
||||
@@ -150,17 +152,19 @@ Dialog = arch/Dialog/Dialog.cpp arch/Dialog/Dialog.h arch/Dialog/DialogDriver.h
|
||||
Threads = arch/Threads/Threads.h
|
||||
|
||||
if HAVE_X11
|
||||
# InputHandler_X11 depends on LowLevelWindow_X11
|
||||
InputHandler += arch/InputHandler/InputHandler_X11.cpp arch/InputHandler/InputHandler_X11.h
|
||||
LowLevelWindow += arch/LowLevelWindow/LowLevelWindow_X11.cpp arch/LowLevelWindow/LowLevelWindow_X11.h
|
||||
ArchUtils += archutils/Unix/X11Helper.cpp archutils/Unix/X11Helper.h
|
||||
endif
|
||||
|
||||
else
|
||||
if HAVE_SDL
|
||||
# InputHandler_SDL depends on LowLevelWindow_SDL
|
||||
InputHandler += arch/InputHandler/InputHandler_SDL.cpp arch/InputHandler/InputHandler_SDL.h
|
||||
LowLevelWindow += arch/LowLevelWindow/LowLevelWindow_SDL.cpp arch/LowLevelWindow/LowLevelWindow_SDL.h
|
||||
LoadingWindow += arch/LoadingWindow/LoadingWindow_SDL.cpp arch/LoadingWindow/LoadingWindow_SDL.h
|
||||
StepMania += SDL_utils.cpp SDL_utils.h
|
||||
endif
|
||||
endif
|
||||
|
||||
# Platform-specific drivers:
|
||||
|
||||
@@ -188,11 +192,17 @@ endif
|
||||
|
||||
if LINUX
|
||||
MemoryCard += arch/MemoryCard/MemoryCardDriverThreaded_Linux.cpp arch/MemoryCard/MemoryCardDriverThreaded_Linux.h
|
||||
InputHandler += arch/InputHandler/InputHandler_Linux_Joystick.h arch/InputHandler/InputHandler_Linux_Joystick.cpp
|
||||
|
||||
# XXX: WTF? InputHandler_Linux_tty depends on SDL!
|
||||
if HAVE_SDL
|
||||
InputHandler += arch/InputHandler/InputHandler_Linux_tty.h arch/InputHandler/InputHandler_Linux_tty.cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
Arch = $(LoadingWindow) $(Sound) $(ArchHooks) $(InputHandler) $(MovieTexture) \
|
||||
$(Lights) $(MemoryCard) $(LowLevelWindow) $(ArchUtils) $(Dialog) $(Threads) \
|
||||
arch/arch.cpp arch/arch.h arch/arch_default.h arch/arch_linux.h arch/arch_platform.h
|
||||
arch/arch_default.h arch/arch_platform.h
|
||||
|
||||
RageSoundFileReaders = RageSoundReader_WAV.cpp RageSoundReader_WAV.h
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "StyleInput.h"
|
||||
#include "Style.h"
|
||||
#include "RageUtil.h"
|
||||
#include "arch/arch.h"
|
||||
#include "RageDisplay.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "IniFile.h"
|
||||
#include "RageException.h"
|
||||
#include "GameState.h"
|
||||
#include "arch/arch.h"
|
||||
#include "PlayerState.h"
|
||||
|
||||
#define AI_PATH "Data/AI.ini"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "GameState.h"
|
||||
#include "RageDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "arch/arch.h" /* for default driver specs */
|
||||
#include "arch/arch_default.h"
|
||||
#include "RageSoundReader_Resample.h" /* for ResampleQuality */
|
||||
#include "RageFile.h"
|
||||
#include "ProductInfo.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "ProfileManager.h"
|
||||
#include "RageUtil.h"
|
||||
#include "arch/arch.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageFile.h"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#ifndef RAGEDISPLAY_H
|
||||
#define RAGEDISPLAY_H
|
||||
|
||||
#include "global.h"
|
||||
#include "RageTypes.h"
|
||||
#include "ModelTypes.h"
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
#include "ScreenDimensions.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
|
||||
// Static libraries
|
||||
// load Windows D3D8 dynamically
|
||||
#if defined(_WINDOWS)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
#include "StepMania.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "arch/LowLevelWindow/LowLevelWindow.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "RageInput.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageException.h"
|
||||
#include "arch/arch.h"
|
||||
#include "arch/InputHandler/InputHandler.h"
|
||||
|
||||
RageInput* INPUTMAN = NULL; // globally accessable input device
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "arch/ArchHooks/ArchHooks.h"
|
||||
#include "arch/arch.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageTimer.h"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "RageLog.h"
|
||||
#include "RageTimer.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "arch/Sound/RageSoundDriver.h"
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageFile.h"
|
||||
#include "arch/arch.h"
|
||||
|
||||
#include <numeric>
|
||||
#include <ctime>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "RageUtil_FileDB.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "arch/arch.h"
|
||||
|
||||
/* Search for "beginning*containing*ending". */
|
||||
void FileSet::GetFilesMatching(const CString &beginning, const CString &containing, const CString &ending, vector<CString> &out, bool bOnlyDirs) const
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "Steps.h"
|
||||
#include <utility>
|
||||
#include "NoteFieldPositioning.h"
|
||||
#include "arch/arch.h"
|
||||
#include "NoteDataUtil.h"
|
||||
#include "SongUtil.h"
|
||||
#include "StepsUtil.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "TitleSubstitution.h"
|
||||
#include "BannerCache.h"
|
||||
#include "Sprite.h"
|
||||
#include "arch/arch.h"
|
||||
#include "RageFile.h"
|
||||
#include "RageFileManager.h"
|
||||
#include "RageSurface.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "MsdFile.h"
|
||||
#include "NotesLoaderDWI.h"
|
||||
#include "BannerCache.h"
|
||||
#include "arch/arch.h"
|
||||
|
||||
#include "GameState.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "RageDisplay.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "arch/ArchHooks/ArchHooks.h"
|
||||
#include "arch/LoadingWindow/LoadingWindow.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
@@ -35,6 +34,8 @@
|
||||
#include "RageSurface.h"
|
||||
#include "RageSurface_Load.h"
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
//
|
||||
// StepMania global classes
|
||||
//
|
||||
@@ -1358,7 +1359,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam
|
||||
!INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LALT))) ||
|
||||
(DeviceI == DeviceInput(DEVICE_KEYBOARD, KEY_F12) &&
|
||||
(INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_RMETA)) ||
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LMETA)))))
|
||||
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LMETA)))))
|
||||
{
|
||||
// If holding LShift save uncompressed, else save compressed
|
||||
bool bSaveCompressed = !INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT) );
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "TitleSubstitution.h"
|
||||
#include "arch/arch.h"
|
||||
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
ArchHooks *HOOKS = NULL;
|
||||
|
||||
#include "../arch_platform.h"
|
||||
#include "Selector_ArchHooks.h"
|
||||
ArchHooks *MakeArchHooks() { return new ARCH_HOOKS; }
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,7 +12,9 @@ public:
|
||||
int64_t GetMicrosecondsSinceStart();
|
||||
};
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
#ifdef ARCH_HOOKS
|
||||
#error "More than one ArchHooks selected!"
|
||||
#endif
|
||||
#define ARCH_HOOKS ArchHooks_Unix
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,9 @@ private:
|
||||
void CheckVideoDriver();
|
||||
};
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
#ifdef ARCH_HOOKS
|
||||
#error "More than one ArchHooks selected!"
|
||||
#endif
|
||||
#define ARCH_HOOKS ArchHooks_Win32
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,9 @@ inline void WRITEMSRREG( UINT32 reg, LARGE_INTEGER val )
|
||||
};
|
||||
}
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
#ifdef ARCH_HOOKS
|
||||
#error "More than one ArchHooks selected!"
|
||||
#endif
|
||||
#define ARCH_HOOKS ArchHooks_Xbox
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,9 @@ protected:
|
||||
RageMutex *TimeCritMutex;
|
||||
};
|
||||
|
||||
#undef ARCH_HOOKS
|
||||
#ifdef ARCH_HOOKS
|
||||
#error "More than one ArchHooks selected!"
|
||||
#endif
|
||||
#define ARCH_HOOKS ArchHooks_darwin
|
||||
|
||||
#endif /* ARCH_HOOKS_DARWIN_H */
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#ifndef SELECTOR_ARCH_HOOKS_H
|
||||
#define SELECTOR_ARCH_HOOKS_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* ArchHooks driver selector. */
|
||||
#if defined(HAVE_DARWIN)
|
||||
#include "ArchHooks_darwin.h"
|
||||
|
||||
#elif defined(HAVE_POSIX)
|
||||
#include "ArchHooks_Unix.h"
|
||||
|
||||
#elif defined(HAVE_WIN32) // XXX: Better name for this API?
|
||||
#include "ArchHooks_Win32.h"
|
||||
|
||||
#elif defined(HAVE_XBOX) // XXX: Better name for this API?
|
||||
#include "ArchHooks_Xbox.h"
|
||||
|
||||
#else
|
||||
#error "No suitable ArchHooks available."
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -5,16 +5,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
/* Hmm. I don't want this to depend on other arch drivers--we should be able to test
|
||||
* this without linking to them. We probably don't actually have to do that just by
|
||||
* #including the headers in arch_Win32.h, etc., but it's still messy ... */
|
||||
#if defined(_WINDOWS)
|
||||
#include "DialogDriver_Win32.h"
|
||||
#endif
|
||||
|
||||
#if defined(DARWIN)
|
||||
#include "DialogDriver_Cocoa.h"
|
||||
#endif
|
||||
#include "Selector_Dialog.h"
|
||||
|
||||
static DialogDriver *g_pImpl = NULL;
|
||||
static DialogDriver_Null g_NullDriver;
|
||||
@@ -37,13 +28,15 @@ void Dialog::Init()
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
|
||||
#if defined(HAVE_DIALOG_WIN32)
|
||||
#if defined(USE_DIALOG_DRIVER_WIN32)
|
||||
if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32;
|
||||
#endif
|
||||
#if defined(HAVE_DIALOG_COCOA)
|
||||
#if defined(USE_DIALOG_DRIVER_COCOA)
|
||||
if( !DriversToTry[i].CompareNoCase("Cocoa") ) g_pImpl = new DialogDriver_Cocoa;
|
||||
#endif
|
||||
#if defined(USE_DIALOG_DRIVER_NULL)
|
||||
if( !DriversToTry[i].CompareNoCase("Null") ) g_pImpl = new DialogDriver_Null;
|
||||
#endif
|
||||
|
||||
if( g_pImpl == NULL )
|
||||
continue;
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
};
|
||||
|
||||
class DialogDriver_Null: public DialogDriver { };
|
||||
#define USE_DIALOG_DRIVER_NULL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ public:
|
||||
void OK(CString sMessage, CString ID);
|
||||
Dialog::Result AbortRetryIgnore(CString sMessage, CString ID);
|
||||
};
|
||||
|
||||
#define HAVE_DIALOG_COCOA
|
||||
#define USE_DIALOG_DRIVER_COCOA
|
||||
|
||||
#endif /* ARCH_HOOKS_DARWIN_H */
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public:
|
||||
Dialog::Result AbortRetryIgnore( CString sMessage, CString ID );
|
||||
Dialog::Result AbortRetry( CString sMessage, CString ID );
|
||||
};
|
||||
|
||||
#define HAVE_DIALOG_WIN32
|
||||
#define USE_DIALOG_DRIVER_WIN32
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#ifndef XBOX_ARCH_H
|
||||
#define XBOX_ARCH_H
|
||||
#ifndef SELECTOR_DIALOG
|
||||
#define SELECTOR_DIALOG
|
||||
|
||||
/* Load drivers for Xbox. */
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
#include "LoadingWindow/LoadingWindow_Xbox.h"
|
||||
/* Dialog drivers selector. */
|
||||
#ifdef HAVE_WIN32
|
||||
#include "DialogDriver_Win32.h"
|
||||
#endif
|
||||
|
||||
#include "ArchHooks/ArchHooks_Xbox.h"
|
||||
#ifdef HAVE_COCOA
|
||||
#include "DialogDriver_Cocoa.h"
|
||||
#endif
|
||||
|
||||
#include "InputHandler/InputHandler_Xbox.h"
|
||||
|
||||
#include "Sound/RageSoundDriver_DSound.h"
|
||||
|
||||
/* Undef this if you need no SDL input. */
|
||||
#undef SUPPORT_SDL_INPUT
|
||||
#include "DialogDriver.h" // DialogDriver_Null is in here
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002 Glenn Maynard, Chris Danford
|
||||
* (c) 2005 Ben Anderson.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -40,4 +40,3 @@
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,51 @@
|
||||
#include "global.h"
|
||||
#include "InputFilter.h"
|
||||
#include "RageUtil.h"
|
||||
#include "InputHandler.h"
|
||||
|
||||
#include "Selector_InputHandler.h"
|
||||
|
||||
void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
|
||||
for(unsigned i = 0; i < DriversToTry.size(); ++i)
|
||||
{
|
||||
#ifdef USE_INPUT_HANDLER_DIRECTINPUT
|
||||
if(!DriversToTry[i].CompareNoCase("DirectInput") ) Add.push_back(new InputHandler_DInput);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_LINUX_JOYSTICK
|
||||
if(!DriversToTry[i].CompareNoCase("Linux_Joystick") ) Add.push_back(new InputHandler_Linux_Joystick);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_LINUX_TTY
|
||||
if(!DriversToTry[i].CompareNoCase("Linux_tty") ) Add.push_back(new InputHandler_Linux_tty);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_MONKEY_KEYBOARD
|
||||
if(!DriversToTry[i].CompareNoCase("MonkeyKeyboard") ) Add.push_back(new InputHandler_MonkeyKeyboard);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_SDL
|
||||
if(!DriversToTry[i].CompareNoCase("SDL") ) Add.push_back(new InputHandler_SDL);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_WIN32_PARA
|
||||
if(!DriversToTry[i].CompareNoCase("Para") ) Add.push_back(new InputHandler_Win32_Para);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_WIN32_PUMP
|
||||
if(!DriversToTry[i].CompareNoCase("Pump") ) Add.push_back(new InputHandler_Win32_Pump);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_X11
|
||||
if(!DriversToTry[i].CompareNoCase("X11") ) Add.push_back(new InputHandler_X11);
|
||||
#endif
|
||||
#ifdef USE_INPUT_HANDLER_XBOX
|
||||
if(!DriversToTry[i].CompareNoCase("Xbox") ) Add.push_back(new InputHandler_Xbox);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void InputHandler::UpdateTimer()
|
||||
{
|
||||
m_LastUpdate.Touch();
|
||||
|
||||
@@ -55,6 +55,8 @@ protected:
|
||||
void UpdateTimer();
|
||||
};
|
||||
|
||||
void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
void Update(float fDeltaTime);
|
||||
void WindowReset();
|
||||
};
|
||||
#define USE_INPUT_HANDLER_DIRECTINPUT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
private:
|
||||
int fds[NUM_JOYSTICKS];
|
||||
};
|
||||
#define USE_INPUT_HANDLER_LINUX_JOYSTICK
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
~InputHandler_Linux_tty();
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
#define USE_INPUT_HANDLER_LINUX_TTY
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
~InputHandler_MonkeyKeyboard();
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
#define USE_INPUT_HANDLER_MONKEY_KEYBOARD
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
~InputHandler_SDL();
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
|
||||
#define USE_INPUT_HANDLER_SDL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
~InputHandler_Win32_Para();
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
#define USE_INPUT_HANDLER_WIN32_PARA
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
~InputHandler_Win32_Pump();
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
#define USE_INPUT_HANDLER_WIN32_PUMP
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
void Update(float fDeltaTime);
|
||||
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
|
||||
};
|
||||
#define USE_INPUT_HANDLER_X11
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
private:
|
||||
void getHandles();
|
||||
};
|
||||
|
||||
#define USE_INPUT_HANDLER_XBOX
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
#ifndef SELECTOR_INPUT_HANDLER_H
|
||||
#define SELECTOR_INPUT_HANDLER_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* InputHandler drivers selector. */
|
||||
#ifdef HAVE_DIRECTX
|
||||
#include "InputHandler_DirectInput.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LINUXKERNEL
|
||||
#include "InputHandler_Linux_Joystick.h"
|
||||
// XXX: WTF? InputHandler_Linux_tty depends on SDL!
|
||||
#ifdef HAVE_SDL
|
||||
#include "InputHandler_Linux_tty.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "InputHandler_MonkeyKeyboard.h"
|
||||
|
||||
#ifdef HAVE_SDL
|
||||
#include "InputHandler_SDL.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WIN32
|
||||
#include "InputHandler_Win32_Pump.h"
|
||||
#include "InputHandler_Win32_Para.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XBOX
|
||||
#include "InputHandler_Xbox.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X11
|
||||
#include "InputHandler_X11.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "LightsDriver.h"
|
||||
#include "RageLog.h"
|
||||
#include "arch/arch.h"
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
#include "Selector_LightsDriver.h"
|
||||
|
||||
LightsDriver *MakeLightsDriver(CString driver)
|
||||
{
|
||||
@@ -10,17 +10,23 @@ LightsDriver *MakeLightsDriver(CString driver)
|
||||
|
||||
LightsDriver *ret = NULL;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
// if( !driver.CompareNoCase("Parallel") ) ret = new LightsDriver_Win32Parallel;
|
||||
#ifdef USE_LIGHTS_DRIVER_LINUX_PARALLEL
|
||||
if( !driver.CompareNoCase("LinuxParallel") ) ret = new LightsDriver_LinuxParallel;
|
||||
#endif
|
||||
if( !driver.CompareNoCase("SystemMessage") ) ret = new LightsDriver_SystemMessage;
|
||||
|
||||
#ifdef LINUX
|
||||
if( !driver.CompareNoCase("WeedTech") ) ret = new LightsDriver_LinuxWeedTech;
|
||||
if( !driver.CompareNoCase("LinuxParallel") ) ret = new LightsDriver_LinuxParallel;
|
||||
#ifdef USE_LIGHTS_DRIVER_LINUX_WEEDTECH
|
||||
if( !driver.CompareNoCase("WeedTech") ) ret = new LightsDriver_LinuxWeedTech;
|
||||
#endif
|
||||
#ifdef USE_LIGHTS_DRIVER_NULL
|
||||
if( !driver.CompareNoCase("Null") ) ret = new LightsDriver_Null;
|
||||
#endif
|
||||
#ifdef USE_LIGHTS_DRIVER_SYSTEM_MESSAGE
|
||||
if( !driver.CompareNoCase("SystemMessage") ) ret = new LightsDriver_SystemMessage;
|
||||
#endif
|
||||
#ifdef USE_LIGHTS_DRIVER_WIN32_PARALLEL
|
||||
if( !driver.CompareNoCase("Parallel") ) ret = new LightsDriver_Win32Parallel;
|
||||
#endif
|
||||
|
||||
if( ret == NULL && driver.CompareNoCase("Null") )
|
||||
if( ret == NULL )
|
||||
LOG->Warn( "Unknown lights driver name: %s", driver.c_str() );
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
virtual ~LightsDriver_LinuxParallel();
|
||||
virtual void Set( const LightsState *ls );
|
||||
};
|
||||
#define USE_LIGHTS_DRIVER_LINUX_PARALLEL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
|
||||
virtual void Set( const LightsState *ls );
|
||||
};
|
||||
#define USE_LIGHTS_DRIVER_LINUX_WEEDTECH
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
|
||||
void Set( const LightsState *ls ) {};
|
||||
};
|
||||
|
||||
#define USE_LIGHTS_DRIVER_NULL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ public:
|
||||
|
||||
virtual void Set( const LightsState *ls );
|
||||
};
|
||||
#define USE_LIGHTS_DRIVER_SYSTEM_MESSAGE
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
|
||||
virtual void Set( const LightsState *ls );
|
||||
};
|
||||
#define USE_LIGHTS_DRIVER_WIN32_PARALLEL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef SELECTOR_LIGHTS_DRIVER_H
|
||||
#define SELECTOR_LIGHTS_DRIVER_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* LightsDriver selector. */
|
||||
#ifdef HAVE_WIN32
|
||||
#include "LightsDriver_Win32Parallel.h"
|
||||
#endif
|
||||
#ifdef HAVE_LINUXKERNEL
|
||||
#include "LightsDriver_LinuxParallel.h"
|
||||
#include "LightsDriver_LinuxWeedTech.h"
|
||||
#endif
|
||||
#include "LightsDriver_SystemMessage.h"
|
||||
#include "LightsDriver_Null.h"
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -0,0 +1,89 @@
|
||||
#include "LoadingWindow.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "RageLog.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
#include "Selector_LoadingWindow.h"
|
||||
|
||||
LoadingWindow *MakeLoadingWindow()
|
||||
{
|
||||
if( !PREFSMAN->m_bShowLoadingWindow )
|
||||
return new LoadingWindow_Null;
|
||||
|
||||
/* Don't load NULL by default. On most systems, if we can't load the SDL
|
||||
* loading window, we won't be able to init OpenGL, either, so don't bother. */
|
||||
CString drivers = "xbox,win32,cocoa,gtk,sdl";
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
LoadingWindow *ret = NULL;
|
||||
|
||||
for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i)
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
|
||||
#ifdef USE_LOADING_WINDOW_COCOA
|
||||
if(!DriversToTry[i].CompareNoCase("Cocoa") ) ret = new LoadingWindow_Cocoa;
|
||||
#endif
|
||||
#ifdef USE_LOADING_WINDOW_GTK
|
||||
if(!DriversToTry[i].CompareNoCase("Gtk") ) ret = new LoadingWindow_Gtk;
|
||||
#endif
|
||||
#ifdef USE_LOADING_WINDOW_NULL
|
||||
if(!DriversToTry[i].CompareNoCase("Null") ) ret = new LoadingWindow_Null;
|
||||
#endif
|
||||
#ifdef USE_LOADING_WINDOW_SDL
|
||||
if(!DriversToTry[i].CompareNoCase("SDL") ) ret = new LoadingWindow_SDL;
|
||||
#endif
|
||||
#ifdef USE_LOADING_WINDOW_WIN32
|
||||
if(!DriversToTry[i].CompareNoCase("Win32") ) ret = new LoadingWindow_Win32;
|
||||
#endif
|
||||
#ifdef USE_LOADING_WINDOW_XBOX
|
||||
if(!DriversToTry[i].CompareNoCase("Xbox") ) ret = new LoadingWindow_Xbox;
|
||||
#endif
|
||||
|
||||
|
||||
if( ret == NULL )
|
||||
continue;
|
||||
|
||||
CString sError = ret->Init();
|
||||
if( sError != "" )
|
||||
{
|
||||
LOG->Info("Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str());
|
||||
SAFE_DELETE( ret );
|
||||
}
|
||||
}
|
||||
|
||||
if(ret)
|
||||
LOG->Info("Loading window: %s", Driver.c_str());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef LOADING_WINDOW_H
|
||||
#define LOADING_WINDOW_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
struct RageSurface;
|
||||
class LoadingWindow
|
||||
{
|
||||
@@ -15,6 +17,8 @@ public:
|
||||
virtual void SetIcon( const RageSurface *pIcon ) { }
|
||||
};
|
||||
|
||||
LoadingWindow *MakeLoadingWindow();
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* LoadingWindow_Cocoa - Loading window for OSX */
|
||||
|
||||
#ifndef LOADING_WINDOW_COCOA
|
||||
#define LOADING_WINDOW_COCOA
|
||||
#ifndef LOADING_WINDOW_COCOA_H
|
||||
#define LOADING_WINDOW_COCOA_H
|
||||
|
||||
#include "LoadingWindow.h"
|
||||
|
||||
@@ -17,10 +17,9 @@ public:
|
||||
void Paint() {} /* Not needed */
|
||||
void SetText( CString str ) { SetCocoaWindowText( str ); }
|
||||
};
|
||||
#define USE_LOADING_WINDOW_COCOA
|
||||
|
||||
#define HAVE_LOADING_WINDOW_COCOA
|
||||
|
||||
#endif /* LOADING_WINDOW_COCOA */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Steve Checkoway
|
||||
|
||||
@@ -15,8 +15,7 @@ public:
|
||||
void SetText(CString str);
|
||||
void Paint() { }
|
||||
};
|
||||
|
||||
#define HAVE_LOADING_WINDOW_GTK
|
||||
#define USE_LOADING_WINDOW_GTK
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@ public:
|
||||
void SetText(CString str) { }
|
||||
void Paint() { }
|
||||
};
|
||||
|
||||
#define HAVE_LOADING_WINDOW_NULL
|
||||
#define USE_LOADING_WINDOW_NULL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ public:
|
||||
|
||||
void Paint();
|
||||
};
|
||||
|
||||
#define HAVE_LOADING_WINDOW_SDL
|
||||
#define USE_LOADING_WINDOW_SDL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ private:
|
||||
|
||||
static BOOL CALLBACK WndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
};
|
||||
|
||||
#define HAVE_LOADING_WINDOW_WIN32
|
||||
#define USE_LOADING_WINDOW_WIN32
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ protected:
|
||||
XFONT* font;
|
||||
bool useImage;
|
||||
};
|
||||
#define USE_LOADING_WINDOW_XBOX
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+21
-17
@@ -1,31 +1,35 @@
|
||||
#ifndef WIN32_ARCH_H
|
||||
#define WIN32_ARCH_H
|
||||
#ifndef SELECTOR_LOADING_WINDOW_H
|
||||
#define SELECTOR_LOADING_WINDOW_H
|
||||
|
||||
/* Load drivers for Win32. */
|
||||
#include "LoadingWindow/LoadingWindow_Win32.h"
|
||||
#include "ArchHooks/ArchHooks_Win32.h"
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
#include "InputHandler/InputHandler_DirectInput.h"
|
||||
#include "InputHandler/InputHandler_Win32_Pump.h"
|
||||
#include "InputHandler/InputHandler_Win32_Para.h"
|
||||
/* LoadingWindow driver selector. */
|
||||
#ifdef HAVE_COCOA
|
||||
#include "LoadingWindow_Cocoa.h"
|
||||
#endif
|
||||
|
||||
#include "Sound/RageSoundDriver_DSound.h"
|
||||
#include "Sound/RageSoundDriver_DSound_Software.h"
|
||||
#include "Sound/RageSoundDriver_WaveOut.h"
|
||||
#ifdef HAVE_GTK
|
||||
#include "LoadingWindow_Gtk.h"
|
||||
#endif
|
||||
|
||||
#include "Lights/LightsDriver_Win32Parallel.h"
|
||||
#include "LoadingWindow_Null.h"
|
||||
|
||||
#include "MemoryCard/MemoryCardDriverThreaded_Windows.h"
|
||||
#ifdef HAVE_SDL
|
||||
#include "LoadingWindow_SDL.h"
|
||||
#endif
|
||||
|
||||
#include "LowLevelWindow/LowLevelWindow_Win32.h"
|
||||
#ifdef HAVE_WIN32
|
||||
#include "LoadingWindow_Win32.h"
|
||||
#endif
|
||||
|
||||
#define HAVE_FFMPEG
|
||||
#undef SUPPORT_SDL_INPUT
|
||||
#ifdef HAVE_XBOX
|
||||
#include "LoadingWindow_Xbox.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+4
-9
@@ -1,15 +1,11 @@
|
||||
#ifndef ARCH_DARWIN_H
|
||||
#define ARCH_DARWIN_H
|
||||
#include "LowLevelWindow.h"
|
||||
|
||||
#include "Sound/RageSoundDriver_CA.h"
|
||||
#include "Sound/RageSoundDriver_QT1.h"
|
||||
#include "LoadingWindow/LoadingWindow_Cocoa.h"
|
||||
#include "ArchHooks/ArchHooks_darwin.h"
|
||||
#include "Selector_LowLevelWindow.h"
|
||||
|
||||
#endif
|
||||
LowLevelWindow *MakeLowLevelWindow() { return new ARCH_LOW_LEVEL_WINDOW; }
|
||||
|
||||
/*
|
||||
* (c) 2003 Steve Checkoway
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -32,4 +28,3 @@
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* we use SDL. Note that not all SDL operations go here; however, nothing
|
||||
* outside of this can assume that SDL has VIDEO initialized. */
|
||||
|
||||
#include "global.h"
|
||||
#include "RageDisplay.h" // for RageDisplay::VideoModeParams
|
||||
|
||||
class LowLevelWindow
|
||||
@@ -25,6 +26,8 @@ public:
|
||||
virtual RageDisplay::VideoModeParams GetVideoModeParams() const = 0;
|
||||
};
|
||||
|
||||
LowLevelWindow *MakeLowLevelWindow();
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -17,7 +17,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const { return CurrentParams; }
|
||||
};
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_SDL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,8 +15,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const;
|
||||
};
|
||||
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_Win32
|
||||
|
||||
#endif
|
||||
|
||||
@@ -97,7 +97,8 @@ CString LowLevelWindow_X11::TryVideoMode(RageDisplay::VideoModeParams p, bool &b
|
||||
// We're remodeling the existing window, and not touching the
|
||||
// context.
|
||||
bNewDeviceOut = false;
|
||||
// Remap the window to work around possible buggy WMs and/or X servers
|
||||
// Remap the window to work around possible buggy WMs and/or
|
||||
// X servers
|
||||
XUnmapWindow(X11Helper::Dpy(), X11Helper::Win() );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@ public:
|
||||
|
||||
RageDisplay::VideoModeParams GetVideoModeParams() const { return CurrentParams; }
|
||||
};
|
||||
// XXX: Shouldn't we try multiple LowLevelWindows and use whichever works?
|
||||
#undef ARCH_LOW_LEVEL_WINDOW
|
||||
#ifdef ARCH_LOW_LEVEL_WINDOW
|
||||
#error "More than one LowLevelWindow selected!"
|
||||
#endif
|
||||
#define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_X11
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef SELECTOR_LOW_LEVEL_WINDOW_H
|
||||
#define SELECTOR_LOW_LEVEL_WINDOW_H
|
||||
|
||||
/* LowLevelWindow selector. */
|
||||
#if defined(HAVE_WIN32)
|
||||
#include "LowLevelWindow_Win32.h"
|
||||
#elif defined(HAVE_X11) // Prefer LLW_X11 over LLW_SDL
|
||||
#include "LowLevelWindow_X11.h"
|
||||
#elif defined(HAVE_SDL)
|
||||
#include "LowLevelWindow_SDL.h"
|
||||
#else
|
||||
#error "No suitable LowLevelWindow available."
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "global.h"
|
||||
#include "MemoryCardDriver.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "MemoryCardDriver_Null.h"
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
#include "Selector_MemoryCardDriver.h"
|
||||
|
||||
bool UsbStorageDevice::operator==(const UsbStorageDevice& other) const
|
||||
{
|
||||
@@ -31,11 +32,10 @@ MemoryCardDriver *MakeMemoryCardDriver()
|
||||
|
||||
MemoryCardDriver *ret = NULL;
|
||||
|
||||
#ifdef LINUX
|
||||
ret = new MemoryCardDriverThreaded_Linux;
|
||||
#elif _WINDOWS
|
||||
ret = new MemoryCardDriverThreaded_Windows;
|
||||
#ifdef ARCH_MEMORY_CARD_DRIVER
|
||||
ret = new ARCH_MEMORY_CARD_DRIVER;
|
||||
#endif
|
||||
|
||||
if( !ret )
|
||||
ret = new MemoryCardDriver_Null;
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@ protected:
|
||||
vector<UsbStorageDevice> m_vDevicesLastSeen;
|
||||
};
|
||||
|
||||
#ifdef ARCH_MEMORY_CARD_DRIVER
|
||||
#error "More than one MemoryCardDriver selected!"
|
||||
#endif
|
||||
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_Linux
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -20,6 +20,11 @@ private:
|
||||
DWORD m_dwLastLogicalDrives;
|
||||
};
|
||||
|
||||
#ifdef ARCH_MEMORY_CARD_DRIVER
|
||||
#error "More than one MemoryCardDriver included!"
|
||||
#endif
|
||||
#define ARCH_MEMORY_CARD_DRIVER MemoryCardDriverThreaded_Windows
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef SELECTOR_MEMORY_CARD_DRIVER_H
|
||||
#define SELECTOR_MEMORY_CARD_DRIVER_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* MemoryCardDriver selector. */
|
||||
#if defined(HAVE_LINUXKERNEL)
|
||||
#include "MemoryCardDriverThreaded_Linux.h"
|
||||
#elif defined(HAVE_WIN32)
|
||||
#include "MemoryCardDriverThreaded_Win32.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -6,17 +6,7 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "RageFile.h"
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* _WINDOWS is Windows only, where _WIN32 is Windows and Xbox, I think. Does this
|
||||
* work on the Xbox? -glenn */
|
||||
#if defined(_WINDOWS)
|
||||
#include "MovieTexture_DShow.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#include "MovieTexture_FFMpeg.h"
|
||||
#endif
|
||||
#include "Selector_MovieTexture.h"
|
||||
|
||||
void ForceToAscii( CString &str )
|
||||
{
|
||||
@@ -91,13 +81,15 @@ RageMovieTexture *MakeRageMovieTexture(RageTextureID ID)
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
LOG->Trace("Initializing driver: %s", Driver.c_str());
|
||||
#ifdef _WINDOWS
|
||||
#ifdef USE_MOVIE_TEXTURE_DSHOW
|
||||
if( !Driver.CompareNoCase("DShow") ) ret = new MovieTexture_DShow(ID);
|
||||
#endif
|
||||
#ifdef HAVE_FFMPEG
|
||||
#ifdef USE_MOVIE_TEXTURE_FFMPEG
|
||||
if( !Driver.CompareNoCase("FFMpeg") ) ret = new MovieTexture_FFMpeg(ID);
|
||||
#endif
|
||||
#ifdef USE_MOVIE_TEXTURE_NULL
|
||||
if( !Driver.CompareNoCase("Null") ) ret = new MovieTexture_Null(ID);
|
||||
#endif
|
||||
if( ret == NULL )
|
||||
{
|
||||
LOG->Warn( "Unknown movie driver name: %s", Driver.c_str() );
|
||||
|
||||
@@ -92,6 +92,7 @@ private:
|
||||
float CheckFrameTime();
|
||||
void DiscardFrame();
|
||||
};
|
||||
#define USE_MOVIE_TEXTURE_FFMPEG
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef MOVIE_TEXTURE_NULL
|
||||
#define MOVIE_TEXTURE_NULL
|
||||
#ifndef MOVIE_TEXTURE_NULL_H
|
||||
#define MOVIE_TEXTURE_NULL_H
|
||||
/*
|
||||
* MovieTexture_null.h
|
||||
* stepmania
|
||||
@@ -29,8 +29,9 @@ public:
|
||||
void SetPlaybackRate(float rate) { }
|
||||
void SetLooping(bool looping=true) { loop = looping; }
|
||||
};
|
||||
#define USE_MOVIE_TEXTURE_NULL
|
||||
|
||||
#endif /* MOVIE_TEXTURE_NULL */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2003 Steve Checkoway
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef SELECTOR_MOVIE_TEXTURE_H
|
||||
#define SELECTOR_MOVIE_TEXTURE_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* MovieTexture driver selector. */
|
||||
#ifdef HAVE_DIRECTX
|
||||
#include "MovieTexture_DShow.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#include "MovieTexture_FFMpeg.h"
|
||||
#endif
|
||||
|
||||
#include "MovieTexture_Null.h"
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -0,0 +1,95 @@
|
||||
#include "RageSoundDriver.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#include "Selector_RageSoundDriver.h"
|
||||
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
RageSoundDriver *ret = NULL;
|
||||
|
||||
for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i)
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
LOG->Trace("Initializing driver: %s", DriversToTry[i].c_str());
|
||||
|
||||
#ifdef USE_RAGE_SOUND_ALSA9
|
||||
if(!DriversToTry[i].CompareNoCase("ALSA")) ret = new RageSound_ALSA9;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_ALSA9_SOFTWARE
|
||||
if(!DriversToTry[i].CompareNoCase("ALSA-sw")) ret = new RageSound_ALSA9_Software;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_CA
|
||||
if(!DriversToTry[i].CompareNoCase("CoreAudio")) ret = new RageSound_CA;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_DSOUND
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound")) ret = new RageSound_DSound;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_DSOUND_SOFTWARE
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound-sw")) ret = new RageSound_DSound_Software;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_NULL
|
||||
if(!DriversToTry[i].CompareNoCase("Null")) ret = new RageSound_Null;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_OSS
|
||||
if(!DriversToTry[i].CompareNoCase("OSS")) ret = new RageSound_OSS;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_QT1
|
||||
if(!DriversToTry[i].CompareNoCase("QT1")) ret = new RageSound_QT1;
|
||||
#endif
|
||||
#ifdef USE_RAGE_SOUND_WAVE_OUT
|
||||
if(!DriversToTry[i].CompareNoCase("WaveOut")) ret = new RageSound_WaveOut;
|
||||
#endif
|
||||
|
||||
if( ret == NULL )
|
||||
{
|
||||
LOG->Warn( "Unknown sound driver name: %s", DriversToTry[i].c_str() );
|
||||
continue;
|
||||
}
|
||||
|
||||
CString sError = ret->Init();
|
||||
if( sError != "" )
|
||||
{
|
||||
LOG->Info( "Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str() );
|
||||
SAFE_DELETE( ret );
|
||||
}
|
||||
}
|
||||
|
||||
if(ret)
|
||||
LOG->Info("Sound driver: %s", Driver.c_str());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef RAGE_SOUND_DRIVER
|
||||
#define RAGE_SOUND_DRIVER
|
||||
|
||||
#include "global.h"
|
||||
|
||||
class RageSoundBase;
|
||||
class RageSoundDriver
|
||||
{
|
||||
@@ -48,6 +50,8 @@ public:
|
||||
virtual ~RageSoundDriver() { }
|
||||
};
|
||||
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers);
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
|
||||
@@ -71,6 +71,7 @@ private:
|
||||
|
||||
void GetData();
|
||||
};
|
||||
#define USE_RAGE_SOUND_ALSA9
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
CString Init();
|
||||
~RageSound_ALSA9_Software();
|
||||
};
|
||||
#define USE_RAGE_SOUND_ALSA9_SOFTWARE
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ public:
|
||||
int64_t GetPosition(const RageSoundBase *sound) const;
|
||||
void SetupDecodingThread();
|
||||
};
|
||||
|
||||
#define RAGE_SOUND_CA
|
||||
#define USE_RAGE_SOUND_CA
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ private:
|
||||
|
||||
int GetSampleRate( int rate ) const { return rate; }
|
||||
};
|
||||
#define USE_RAGE_SOUND_DSOUND
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ public:
|
||||
virtual ~RageSound_DSound_Software();
|
||||
CString Init();
|
||||
};
|
||||
#define USE_RAGE_SOUND_DSOUND_SOFTWARE
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ protected:
|
||||
public:
|
||||
RageSound_Null();
|
||||
};
|
||||
#define USE_RAGE_SOUND_NULL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
CString Init();
|
||||
~RageSound_OSS();
|
||||
};
|
||||
#define USE_RAGE_SOUND_OSS
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef RAGE_SOUND_QT1
|
||||
#define RAGE_SOUND_QT1
|
||||
#ifndef RAGE_SOUND_QT1_H
|
||||
#define RAGE_SOUND_QT1_H
|
||||
/*
|
||||
* RageSoundDriver_QT1.h
|
||||
* stepmania
|
||||
@@ -37,8 +37,9 @@ public:
|
||||
virtual ~RageSound_QT1();
|
||||
static void GetData(QT::SndChannel *chan, QT::SndCommand *cmd_passed);
|
||||
};
|
||||
#define USE_RAGE_SOUND_QT1
|
||||
|
||||
#endif /* RAGE_SOUND_QT1 */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Steve Checkoway
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
~RageSound_WaveOut();
|
||||
CString Init();
|
||||
};
|
||||
#define USE_RAGE_SOUND_WAVE_OUT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+24
-19
@@ -1,35 +1,41 @@
|
||||
#ifndef LINUX_ARCH_H
|
||||
#define LINUX_ARCH_H
|
||||
#ifndef SELECTOR_RAGE_SOUND_DRIVER_H
|
||||
#define SELECTOR_RAGE_SOUND_DRIVER_H
|
||||
|
||||
#include "arch/arch_platform.h"
|
||||
|
||||
/* RageSoundDriver selector. */
|
||||
#ifdef HAVE_ALSA
|
||||
#include "Sound/RageSoundDriver_ALSA9.h"
|
||||
#include "Sound/RageSoundDriver_ALSA9_Software.h"
|
||||
#include "RageSoundDriver_ALSA9.h"
|
||||
#include "RageSoundDriver_ALSA9_Software.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COREAUDIO
|
||||
#include "RageSoundDriver_CA.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DIRECTX
|
||||
#include "RageSoundDriver_DSound.h"
|
||||
#include "RageSoundDriver_DSound_Software.h"
|
||||
#endif
|
||||
|
||||
#include "RageSoundDriver_Null.h"
|
||||
|
||||
#ifdef HAVE_OSS
|
||||
#include "Sound/RageSoundDriver_OSS.h"
|
||||
#include "RageSoundDriver_OSS.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GTK
|
||||
#include "LoadingWindow/LoadingWindow_Gtk.h"
|
||||
#ifdef HAVE_QUICKTIME1
|
||||
#include "RageSoundDriver_QT1.h"
|
||||
#endif
|
||||
|
||||
/* Load this even if we have GTK, since we can fall back if GTK is missing. */
|
||||
#ifdef HAVE_SDL
|
||||
#include "LoadingWindow/LoadingWindow_SDL.h"
|
||||
#ifdef HAVE_WIN32
|
||||
#include "RageSoundDriver_WaveOut.h"
|
||||
#endif
|
||||
|
||||
#include "ArchHooks/ArchHooks_Unix.h"
|
||||
|
||||
#include "Lights/LightsDriver_LinuxWeedTech.h"
|
||||
#include "Lights/LightsDriver_LinuxParallel.h"
|
||||
|
||||
#include "MemoryCard/MemoryCardDriverThreaded_Linux.h"
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2003 Glenn Maynard
|
||||
* (c) 2005 Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -52,4 +58,3 @@
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
* This file provides functions to create driver objects.
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include "PrefsManager.h"
|
||||
#include "arch.h"
|
||||
#include "arch_platform.h"
|
||||
|
||||
LoadingWindow *MakeLoadingWindow()
|
||||
{
|
||||
#if defined(XBOX)
|
||||
return new LoadingWindow_Xbox;
|
||||
#endif
|
||||
|
||||
if( !PREFSMAN->m_bShowLoadingWindow )
|
||||
return new LoadingWindow_Null;
|
||||
|
||||
/* Don't load NULL by default. On most systems, if we can't load the SDL
|
||||
* loading window, we won't be able to init OpenGL, either, so don't bother. */
|
||||
CString drivers = "win32,cocoa,gtk,sdl";
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
LoadingWindow *ret = NULL;
|
||||
|
||||
for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i)
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
|
||||
#ifdef HAVE_LOADING_WINDOW_WIN32
|
||||
if(!DriversToTry[i].CompareNoCase("Win32")) ret = new LoadingWindow_Win32;
|
||||
#endif
|
||||
#ifdef HAVE_LOADING_WINDOW_GTK
|
||||
if(!DriversToTry[i].CompareNoCase("Gtk")) ret = new LoadingWindow_Gtk;
|
||||
#endif
|
||||
#ifdef HAVE_LOADING_WINDOW_COCOA
|
||||
if(!DriversToTry[i].CompareNoCase("Cocoa")) ret = new LoadingWindow_Cocoa;
|
||||
#endif
|
||||
#ifdef HAVE_LOADING_WINDOW_SDL
|
||||
if(!DriversToTry[i].CompareNoCase("SDL")) ret = new LoadingWindow_SDL;
|
||||
#endif
|
||||
#ifdef HAVE_LOADING_WINDOW_NULL
|
||||
if(!DriversToTry[i].CompareNoCase("Null")) ret = new LoadingWindow_Null;
|
||||
#endif
|
||||
|
||||
if( ret == NULL )
|
||||
continue;
|
||||
|
||||
CString sError = ret->Init();
|
||||
if( sError != "" )
|
||||
{
|
||||
LOG->Info("Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str());
|
||||
SAFE_DELETE( ret );
|
||||
}
|
||||
}
|
||||
|
||||
if(ret)
|
||||
LOG->Info("Loading window: %s", Driver.c_str());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(SUPPORT_OPENGL)
|
||||
LowLevelWindow *MakeLowLevelWindow() { return new ARCH_LOW_LEVEL_WINDOW; }
|
||||
#endif
|
||||
|
||||
void MakeInputHandlers(CString drivers, vector<InputHandler *> &Add)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
RageSoundDriver *ret = NULL;
|
||||
|
||||
for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i)
|
||||
{
|
||||
#if defined(_WINDOWS)
|
||||
if(!DriversToTry[i].CompareNoCase("DirectInput")) Add.push_back(new InputHandler_DInput);
|
||||
if(!DriversToTry[i].CompareNoCase("Pump")) Add.push_back(new InputHandler_Win32_Pump);
|
||||
// if(!DriversToTry[i].CompareNoCase("Para")) Add.push_back(new InputHandler_Win32_Para);
|
||||
#elif defined(XBOX)
|
||||
if(!DriversToTry[i].CompareNoCase("Xbox")) Add.push_back(new InputHandler_Xbox);
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_SDL_INPUT)
|
||||
if(!DriversToTry[i].CompareNoCase("SDL")) Add.push_back(new InputHandler_SDL);
|
||||
#endif
|
||||
|
||||
if(!DriversToTry[i].CompareNoCase("MonkeyKeyboard"))Add.push_back(new InputHandler_MonkeyKeyboard);
|
||||
}
|
||||
}
|
||||
|
||||
RageSoundDriver *MakeRageSoundDriver(CString drivers)
|
||||
{
|
||||
CStringArray DriversToTry;
|
||||
split(drivers, ",", DriversToTry, true);
|
||||
|
||||
ASSERT( DriversToTry.size() != 0 );
|
||||
|
||||
CString Driver;
|
||||
RageSoundDriver *ret = NULL;
|
||||
|
||||
for(unsigned i = 0; ret == NULL && i < DriversToTry.size(); ++i)
|
||||
{
|
||||
Driver = DriversToTry[i];
|
||||
LOG->Trace("Initializing driver: %s", DriversToTry[i].c_str());
|
||||
|
||||
#ifdef _WINDOWS
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound")) ret = new RageSound_DSound;
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound-sw")) ret = new RageSound_DSound_Software;
|
||||
if(!DriversToTry[i].CompareNoCase("WaveOut")) ret = new RageSound_WaveOut;
|
||||
#endif
|
||||
#ifdef _XBOX
|
||||
if(!DriversToTry[i].CompareNoCase("DirectSound")) ret = new RageSound_DSound;
|
||||
#endif
|
||||
#ifdef HAVE_ALSA
|
||||
if(!DriversToTry[i].CompareNoCase("ALSA")) ret = new RageSound_ALSA9;
|
||||
if(!DriversToTry[i].CompareNoCase("ALSA-sw")) ret = new RageSound_ALSA9_Software;
|
||||
#endif
|
||||
#ifdef HAVE_OSS
|
||||
if(!DriversToTry[i].CompareNoCase("OSS")) ret = new RageSound_OSS;
|
||||
#endif
|
||||
#ifdef RAGE_SOUND_CA
|
||||
if(!DriversToTry[i].CompareNoCase("CoreAudio")) ret = new RageSound_CA;
|
||||
#endif
|
||||
#ifdef RAGE_SOUND_QT1
|
||||
if(!DriversToTry[i].CompareNoCase("QT1")) ret = new RageSound_QT1;
|
||||
#endif
|
||||
if(!DriversToTry[i].CompareNoCase("Null")) ret = new RageSound_Null;
|
||||
|
||||
if( ret == NULL )
|
||||
{
|
||||
LOG->Warn( "Unknown sound driver name: %s", DriversToTry[i].c_str() );
|
||||
continue;
|
||||
}
|
||||
|
||||
CString sError = ret->Init();
|
||||
if( sError != "" )
|
||||
{
|
||||
LOG->Info( "Couldn't load driver %s: %s", DriversToTry[i].c_str(), sError.c_str() );
|
||||
SAFE_DELETE( ret );
|
||||
}
|
||||
}
|
||||
|
||||
if(ret)
|
||||
LOG->Info("Sound driver: %s", Driver.c_str());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,89 +0,0 @@
|
||||
#ifndef ARCH_H
|
||||
#define ARCH_H
|
||||
|
||||
/* Include this file if you need to create an instance of a driver object. */
|
||||
class LoadingWindow;
|
||||
class RageSoundDriver;
|
||||
class ArchHooks;
|
||||
class InputHandler;
|
||||
class LowLevelWindow;
|
||||
class LightsDriver;
|
||||
class MemoryCardDriver;
|
||||
|
||||
LoadingWindow *MakeLoadingWindow();
|
||||
LowLevelWindow *MakeLowLevelWindow();
|
||||
|
||||
void MakeInputHandlers(CString drivers,vector<InputHandler *> &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)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "ALSA,ALSA-sw,OSS"
|
||||
#elif defined(DARWIN)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "CoreAudio,QT1"
|
||||
#elif defined(_WINDOWS)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "DirectSound,DirectSound-sw,WaveOut"
|
||||
#elif defined(_XBOX)
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "DirectSound"
|
||||
#else
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "Null"
|
||||
#endif
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "DirectInput,Pump"
|
||||
#elif defined(_XBOX)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "Xbox"
|
||||
#else
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "SDL"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_MOVIE_DRIVER_LIST "FFMpeg,Null"
|
||||
|
||||
/* 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)
|
||||
#define SYS_BASE_PATH "D:\\"
|
||||
#else
|
||||
#define SYS_BASE_PATH ""
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,49 +1,38 @@
|
||||
#ifndef SDL_ARCH_H
|
||||
#define SDL_ARCH_H
|
||||
#ifndef ARCH_DEFAULT_H
|
||||
#define ARCH_DEFAULT_H
|
||||
|
||||
/* All driver types should have a default, portable implementation, provided
|
||||
* here. */
|
||||
/* None of these SDL implementations run on Xbox, so I've commented
|
||||
* out use of this header and added the #includes to each arch_*.h */
|
||||
/*
|
||||
* The basic design principle of arch is that a new platform can be up and running
|
||||
* quickly using only arch_default, with OpenGL graphics and SDL input, and things can
|
||||
* be overloaded later. That way, people don't have to learn how arch works
|
||||
* until after they have the basic stuff running.
|
||||
*
|
||||
* 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.
|
||||
/* Define the default driver sets. It's okay to have in the sets drivers that
|
||||
* might not be available, just as long as you don't mind if they're used when
|
||||
* they are available. (For example, if we're using X11, we don't want
|
||||
* InputHandler_SDL to be used.) */
|
||||
|
||||
* For InputHandler, undef SUPPORT_SDL_INPUT and we won't create the SDL input
|
||||
* 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
|
||||
* and joysticks. If you write your own handler for these devices types, or if
|
||||
* SDL input doesn't work on your platform, undef SUPPORT_SDL_INPUT in your platform
|
||||
* header. */
|
||||
#define SUPPORT_SDL_INPUT
|
||||
#include "InputHandler/InputHandler_SDL.h"
|
||||
#include "InputHandler/InputHandler_MonkeyKeyboard.h"
|
||||
|
||||
/* Load default fallback drivers; some of these may be overridden by arch-specific
|
||||
* drivers. These are all singleton drivers--we never use more than one. */
|
||||
#include "LoadingWindow/LoadingWindow_Null.h"
|
||||
#include "Sound/RageSoundDriver_Null.h"
|
||||
#include "Lights/LightsDriver_Null.h"
|
||||
#include "Lights/LightsDriver_SystemMessage.h"
|
||||
#include "MemoryCard/MemoryCardDriver_Null.h"
|
||||
|
||||
#if defined(SUPPORT_OPENGL)
|
||||
#include "LowLevelWindow/LowLevelWindow_SDL.h"
|
||||
/* InputHandler drivers */
|
||||
#if defined (HAVE_XBOX)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "Xbox"
|
||||
#elif defined(HAVE_DIRECTX)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "DirectInput,Pump,Para"
|
||||
#elif defined(HAVE_X11) // Prefer X11 over SDL
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "X11,Linux_joystick"
|
||||
#elif defined(HAVE_SDL)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "SDL"
|
||||
#else
|
||||
#if defined(LINUX)
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "Linux_joystick,Linux_tty"
|
||||
#else
|
||||
#define DEFAULT_INPUT_DRIVER_LIST "MonkeyKeyboard"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* MovieTexture drivers */
|
||||
#define DEFAULT_MOVIE_DRIVER_LIST "FFMpeg,DShow,Null"
|
||||
|
||||
/* RageSoundDrivers */
|
||||
#define DEFAULT_SOUND_DRIVER_LIST "ALSA,DirectSound,ALSA-sw,DirectSound-sw,CoreAudio,OSS,QT1,WaveOut,Null"
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* (c) 2002-2005 Glenn Maynard, Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
||||
@@ -1,26 +1,45 @@
|
||||
#ifndef ARCH_PLATFORM_H
|
||||
#define ARCH_PLATFORM_H
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
/* Load default drivers. */
|
||||
#include "arch_default.h"
|
||||
|
||||
/* Override them with arch-specific drivers, as available. */
|
||||
// In here, you define which APIs are guaranteed to be available on which OSes.
|
||||
// Don't ever actually #include anything here -- that's for */Selector_*.h.
|
||||
#if defined(UNIX) || !defined(DARWIN) // Darwin isn't POSIX enough for us.
|
||||
#define HAVE_POSIX
|
||||
#endif
|
||||
#if defined(DARWIN)
|
||||
#define HAVE_DARWIN
|
||||
#define HAVE_COCOA
|
||||
#define HAVE_COREAUDIO
|
||||
#define HAVE_QUICKTIME1
|
||||
#endif
|
||||
#if defined(_WINDOWS)
|
||||
#define HAVE_DIRECTX
|
||||
#define HAVE_WIN32 // XXX: Better name for this API?
|
||||
#endif
|
||||
#if defined(_XBOX)
|
||||
#define HAVE_DIRECTX
|
||||
#define HAVE_XBOX // XXX: Better name for this API?
|
||||
#endif
|
||||
#if defined(LINUX)
|
||||
#include "arch_linux.h"
|
||||
#elif defined(DARWIN)
|
||||
#include "arch_darwin.h"
|
||||
#define HAVE_POSIX // Here just to be explicit.
|
||||
#define HAVE_LINUXKERNEL
|
||||
#endif
|
||||
|
||||
/* I'm also putting the renderer master switch in here, since there's really no
|
||||
* better place to put it. */
|
||||
#if defined(_WINDOWS)
|
||||
#define SUPPORT_OPENGL
|
||||
#define SUPPORT_D3D
|
||||
#elif defined(_XBOX)
|
||||
#include "arch_xbox.h"
|
||||
#elif defined(_WINDOWS)
|
||||
#include "arch_Win32.h"
|
||||
#define SUPPORT_D3D
|
||||
#else
|
||||
#define SUPPORT_OPENGL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2002-2004 Glenn Maynard
|
||||
* (c) 2002-2005 Glenn Maynard, Ben Anderson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
||||
Reference in New Issue
Block a user