diff --git a/Source/controls/devices/joystick.cpp b/Source/controls/devices/joystick.cpp index a0b124c78..762686a53 100644 --- a/Source/controls/devices/joystick.cpp +++ b/Source/controls/devices/joystick.cpp @@ -178,7 +178,7 @@ int Joystick::ToSdlJoyButton(ControllerButton button) } } -bool Joystick::IsHatButtonPressed(ControllerButton button) const +bool Joystick::IsHatButtonPressed(ControllerButton button) { 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 ab8e3df6d..06bcb8825 100644 --- a/Source/controls/devices/joystick.h +++ b/Source/controls/devices/joystick.h @@ -38,7 +38,7 @@ private: static int ToSdlJoyButton(ControllerButton button); // NOLINTNEXTLINE(readability-convert-member-functions-to-static): Not static if joystick mappings are defined. - bool IsHatButtonPressed(ControllerButton button) const; + static bool IsHatButtonPressed(ControllerButton button); SDL_Joystick *sdl_joystick_ = NULL; SDL_JoystickID instance_id_ = -1;