summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/setup_joystick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs/setup_joystick.cpp')
-rw-r--r--src/gui/widgets/tabs/setup_joystick.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp
index 490205b4b..84cd60521 100644
--- a/src/gui/widgets/tabs/setup_joystick.cpp
+++ b/src/gui/widgets/tabs/setup_joystick.cpp
@@ -164,8 +164,7 @@ void Setup_Joystick::setTempEnabled(const bool sel)
void Setup_Joystick::cancel()
{
- if (joystick != nullptr)
- joystick->setEnabled(mOriginalJoystickEnabled);
+ Joystick::setEnabled(mOriginalJoystickEnabled);
if (mOriginalJoystickEnabled != mJoystickEnabled->isSelected())
setTempEnabled(mOriginalJoystickEnabled);
@@ -178,7 +177,7 @@ void Setup_Joystick::apply()
if (joystick == nullptr)
return;
- config.setValue("joystickEnabled", joystick->isEnabled());
+ config.setValue("joystickEnabled", Joystick::isEnabled());
config.setValue("useInactiveJoystick", mUseInactiveCheckBox->isSelected());
joystick->setUseInactive(mUseInactiveCheckBox->isSelected());