CString -> RString

This commit is contained in:
Chris Danford
2006-01-22 01:00:06 +00:00
parent 870ed267fc
commit 7f821e8cfc
578 changed files with 3943 additions and 3946 deletions
@@ -38,7 +38,7 @@ void InputHandler::ButtonPressed( DeviceInput di, bool Down )
}
}
CString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
{
if( di.device == DEVICE_KEYBOARD )
{
@@ -29,10 +29,10 @@ public:
virtual ~InputHandler() { }
virtual void Update() { }
virtual bool DevicesChanged() { return false; }
virtual void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut ) = 0;
virtual void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut ) = 0;
// Override to return a pretty string that's specific to the controller type.
virtual CString GetDeviceSpecificInputString( const DeviceInput &di );
virtual RString GetDeviceSpecificInputString( const DeviceInput &di );
// Override to find out whether the controller is currently plugged in.
// Not all InputHandlers will support this. Not applicable to all InputHandlers.
@@ -71,7 +71,7 @@ private:
IOHIDDeviceInterface **mInterface;
IOHIDQueueInterface **mQueue;
bool mRunning;
CString mDescription;
RString mDescription;
static void AddLogicalDevice( const void *value, void *context );
static void AddElement( const void *value, void *context );
@@ -91,7 +91,7 @@ public:
bool Open( io_object_t device );
void StartQueue( CFRunLoopRef loopRef, IOHIDCallbackFunction callback, void *target, int refCon );
inline const CString& GetDescription() const { return mDescription; }
inline const RString& GetDescription() const { return mDescription; }
};
Device::Device() : mInterface( NULL ), mQueue( NULL ), mRunning( false )
@@ -840,7 +840,7 @@ InputHandler_Carbon::InputHandler_Carbon() : mSem( "Input thread started" )
}
}
void InputHandler_Carbon::GetDevicesAndDescriptions( vector<InputDevice>& dev, vector<CString>& desc )
void InputHandler_Carbon::GetDevicesAndDescriptions( vector<InputDevice>& dev, vector<RString>& desc )
{
dev.push_back( DEVICE_KEYBOARD );
desc.push_back( "Keyboard" );
@@ -23,7 +23,7 @@ public:
InputHandler_Carbon();
~InputHandler_Carbon();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
static void QueueCallBack( void *target, int result, void *refcon, void *sender );
};
@@ -576,7 +576,7 @@ void InputHandler_DInput::InputThreadMain()
CloseHandle(Handle);
}
void InputHandler_DInput::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut )
void InputHandler_DInput::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut )
{
for( unsigned i=0; i < Devices.size(); ++i )
{
@@ -10,7 +10,7 @@ class InputHandler_DInput: public InputHandler
public:
InputHandler_DInput();
~InputHandler_DInput();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
void Update();
bool DevicesChanged();
void WindowReset();
@@ -179,7 +179,7 @@ void InputHandler_Linux_Joystick::InputThread()
InputHandler::UpdateTimer();
}
void InputHandler_Linux_Joystick::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_Linux_Joystick::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
for(int i = 0; i < NUM_JOYSTICKS; ++i)
{
@@ -11,14 +11,14 @@ public:
enum { NUM_JOYSTICKS = 4 };
InputHandler_Linux_Joystick();
~InputHandler_Linux_Joystick();
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut);
private:
static int InputThread_Start( void *p );
void InputThread();
int fds[NUM_JOYSTICKS];
CString m_sDescription[NUM_JOYSTICKS];
RString m_sDescription[NUM_JOYSTICKS];
RageThread m_InputThread;
bool m_bShutdown;
};
@@ -189,7 +189,7 @@ void InputHandler_Linux_tty::Update()
InputHandler::UpdateTimer();
}
void InputHandler_Linux_tty::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_Linux_tty::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
vDevicesOut.push_back( InputDevice(DEVICE_KEYBOARD) );
vDescriptionsOut.push_back( "Keyboard" );
@@ -12,7 +12,7 @@ public:
void Update();
InputHandler_Linux_tty();
~InputHandler_Linux_tty();
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut);
};
#define USE_INPUT_HANDLER_LINUX_TTY
@@ -12,7 +12,7 @@ InputHandler_MonkeyKeyboard::~InputHandler_MonkeyKeyboard()
{
}
void InputHandler_MonkeyKeyboard::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_MonkeyKeyboard::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
vDevicesOut.push_back( InputDevice(DEVICE_KEYBOARD) );
vDescriptionsOut.push_back( "MonkeyKeyboard" );
@@ -11,7 +11,7 @@ public:
void Update();
InputHandler_MonkeyKeyboard();
~InputHandler_MonkeyKeyboard();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
private:
RageTimer m_timerPressButton;
@@ -248,7 +248,7 @@ void InputHandler_SDL::Update()
}
void InputHandler_SDL::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_SDL::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
vDevicesOut.push_back( DEVICE_KEYBOARD );
vDescriptionsOut.push_back( "Keyboard" );
@@ -14,7 +14,7 @@ public:
void Update();
InputHandler_SDL();
~InputHandler_SDL();
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut);
};
#define USE_INPUT_HANDLER_SDL
@@ -11,7 +11,7 @@
static HMIDIIN g_device;
static void CALLBACK midiCallback(HMIDIIN g_device, UINT status, DWORD instancePtr, DWORD data, DWORD timestamp);
static CString GetMidiError( MMRESULT result )
static RString GetMidiError( MMRESULT result )
{
char szError[256];
midiOutGetErrorText( result, szError, 256 );
@@ -65,7 +65,7 @@ InputHandler_Win32_MIDI::~InputHandler_Win32_MIDI()
}
}
void InputHandler_Win32_MIDI::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut )
void InputHandler_Win32_MIDI::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut )
{
if( m_bFoundDevice )
{
@@ -10,7 +10,7 @@ public:
InputHandler_Win32_MIDI();
~InputHandler_Win32_MIDI();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
void SetDev( DeviceInput key, bool pressed ) { ButtonPressed( key, pressed ); }
@@ -37,7 +37,7 @@ InputHandler_Win32_Para::InputHandler_Win32_Para()
SAFE_DELETE( dev );
}
void InputHandler_Win32_Para::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_Win32_Para::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
// The device appears as a HID joystick
}
@@ -9,7 +9,7 @@ class InputHandler_Win32_Para: public InputHandler
{
public:
InputHandler_Win32_Para();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
};
#define USE_INPUT_HANDLER_WIN32_PARA
@@ -67,7 +67,7 @@ void InputHandler_Win32_Pump::HandleInput( int iDevice, int iEvent )
}
}
CString InputHandler_Win32_Pump::GetDeviceSpecificInputString( const DeviceInput &di )
RString InputHandler_Win32_Pump::GetDeviceSpecificInputString( const DeviceInput &di )
{
switch( di.button )
{
@@ -87,7 +87,7 @@ CString InputHandler_Win32_Pump::GetDeviceSpecificInputString( const DeviceInput
return InputHandler::GetDeviceSpecificInputString( di );
}
void InputHandler_Win32_Pump::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_Win32_Pump::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
for(int i = 0; i < NUM_PUMPS; ++i)
{
@@ -11,8 +11,8 @@ public:
void Update();
InputHandler_Win32_Pump();
~InputHandler_Win32_Pump();
CString GetDeviceSpecificInputString( const DeviceInput &di );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
RString GetDeviceSpecificInputString( const DeviceInput &di );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
private:
USBDevice *m_pDevice;
@@ -170,7 +170,7 @@ void InputHandler_X11::Update()
}
void InputHandler_X11::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut )
void InputHandler_X11::GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut )
{
vDevicesOut.push_back( DEVICE_KEYBOARD );
vDescriptionsOut.push_back( "Keyboard" );
@@ -11,7 +11,7 @@ public:
InputHandler_X11();
~InputHandler_X11();
void Update();
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut );
void GetDevicesAndDescriptions( vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut );
};
#define USE_INPUT_HANDLER_X11
@@ -161,7 +161,7 @@ void InputHandler_Xbox::Update()
InputHandler::UpdateTimer();
}
void InputHandler_Xbox::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut)
void InputHandler_Xbox::GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut)
{
for( int i=0; i<NUM_JOYSTICKS; i++ )
{
@@ -16,7 +16,7 @@ public:
void Update();
InputHandler_Xbox();
~InputHandler_Xbox();
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<CString>& vDescriptionsOut);
void GetDevicesAndDescriptions(vector<InputDevice>& vDevicesOut, vector<RString>& vDescriptionsOut);
private:
void getHandles();