Put all the Make* functions into a single .h/.cpp file (yes, kinda like the way it was), and add Make* functions for DialogDrivers. This means there's only one object that's affected by drivers being added/removed. (Driver default changes are a little different -- 2 or 3 objects.) Also one or two minor cleanups. (note: I apparently don't know much about CVS, it appears that some files might not make it into the repository; hang tight, I'm trying to find a solution.)
This commit is contained in:
@@ -3,49 +3,6 @@
|
||||
#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();
|
||||
|
||||
Reference in New Issue
Block a user