simplify
This commit is contained in:
@@ -75,9 +75,9 @@ struct RegisterInputHandler
|
||||
RegisterInputHandler( const istring &sName, CreateInputHandlerFn pfn );
|
||||
};
|
||||
#define REGISTER_INPUT_HANDLER_CLASS2( name, x ) \
|
||||
static InputHandler *Create##name() { return new x; } \
|
||||
static InputHandler *Create##name() { return new InputHandler_##x; } \
|
||||
static RegisterInputHandler register_##className( #name, Create##name )
|
||||
#define REGISTER_INPUT_HANDLER_CLASS( name ) REGISTER_INPUT_HANDLER_CLASS2( name, InputHandler_##name )
|
||||
#define REGISTER_INPUT_HANDLER_CLASS( name ) REGISTER_INPUT_HANDLER_CLASS2( name, name )
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <set>
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Joystick, InputHandler_Linux_Joystick );
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Joystick, Linux_Joystick );
|
||||
|
||||
static const char *Paths[InputHandler_Linux_Joystick::NUM_JOYSTICKS] =
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <linux/keyboard.h>
|
||||
#include <termios.h>
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( tty, InputHandler_Linux_tty );
|
||||
REGISTER_INPUT_HANDLER_CLASS2( tty, Linux_tty );
|
||||
|
||||
/* Map from keys (ignoring shifts) to SDLK values. */
|
||||
static int keys[NR_KEYS];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma comment (lib,"winmm.lib")
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( MIDI, InputHandler_Win32_MIDI );
|
||||
REGISTER_INPUT_HANDLER_CLASS2( MIDI, Win32_MIDI );
|
||||
|
||||
static HMIDIIN g_device;
|
||||
static void CALLBACK midiCallback(HMIDIIN g_device, UINT status, DWORD instancePtr, DWORD data, DWORD timestamp);
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
#include "archutils/Win32/ddk/hidsdi.h"
|
||||
}
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS( Para, InputHandler_Win32_Para );
|
||||
REGISTER_INPUT_HANDLER_CLASS( Para, Win32_Para );
|
||||
|
||||
static void InitHack( HANDLE h )
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "archutils/Win32/ErrorStrings.h"
|
||||
#include "archutils/Win32/USB.h"
|
||||
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Pump, InputHandler_Win32_Pump );
|
||||
REGISTER_INPUT_HANDLER_CLASS2( Pump, Win32_Pump );
|
||||
|
||||
InputHandler_Win32_Pump::InputHandler_Win32_Pump()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user