From 219cf313812a531dcf1ddb4231d5b84b758c4f61 Mon Sep 17 00:00:00 2001 From: Chris Taylor Date: Sun, 6 Nov 2016 14:04:04 +0800 Subject: [PATCH] Change joy_*_handler definitions back to macros for no joystick build in response to feedback --- common/include/joy.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/common/include/joy.h b/common/include/joy.h index 092c46096..14fa761e6 100644 --- a/common/include/joy.h +++ b/common/include/joy.h @@ -50,28 +50,19 @@ namespace dcx { #if DXX_MAX_BUTTONS_PER_JOYSTICK extern window_event_result joy_button_handler(SDL_JoyButtonEvent *jbe); #else -static inline window_event_result joy_button_handler(void *) -{ - return window_event_result::ignored; -} +#define joy_button_handler(jbe) (static_cast(jbe), window_event_result::ignored) #endif #if DXX_MAX_HATS_PER_JOYSTICK extern window_event_result joy_hat_handler(SDL_JoyHatEvent *jhe); #else -static inline window_event_result joy_hat_handler(void *) -{ - return window_event_result::ignored; -} +#define joy_hat_handler(jbe) (static_cast(jbe), window_event_result::ignored) #endif #if DXX_MAX_AXES_PER_JOYSTICK extern window_event_result joy_axis_handler(SDL_JoyAxisEvent *jae); #else -static inline window_event_result joy_axis_handler(void *) -{ - return window_event_result::ignored; -} +#define joy_axis_handler(jbe) (static_cast(jbe), window_event_result::ignored) #endif }