diff --git a/Source/controls/devices/joystick.cpp b/Source/controls/devices/joystick.cpp index d5961a580..b17e06056 100644 --- a/Source/controls/devices/joystick.cpp +++ b/Source/controls/devices/joystick.cpp @@ -178,7 +178,8 @@ int Joystick::ToSdlJoyButton(ControllerButton button) } } -bool Joystick::IsHatButtonPressed(ControllerButton button) +// NOLINTNEXTLINE(readability-convert-member-functions-to-static): Not static if joystick mappings are defined. +bool Joystick::IsHatButtonPressed(ControllerButton button) const { switch (button) { #if defined(JOY_HAT_DPAD_UP_HAT) && defined(JOY_HAT_DPAD_UP) diff --git a/Source/controls/devices/joystick.h b/Source/controls/devices/joystick.h index 06bcb8825..a23333cc2 100644 --- a/Source/controls/devices/joystick.h +++ b/Source/controls/devices/joystick.h @@ -37,8 +37,7 @@ public: private: static int ToSdlJoyButton(ControllerButton button); - // NOLINTNEXTLINE(readability-convert-member-functions-to-static): Not static if joystick mappings are defined. - static bool IsHatButtonPressed(ControllerButton button); + bool IsHatButtonPressed(ControllerButton button) const; SDL_Joystick *sdl_joystick_ = NULL; SDL_JoystickID instance_id_ = -1;