From d3c3a51ede2f642f75f3c855233a37d488ecdc87 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 10 Jul 2015 10:28:04 +0200 Subject: [PATCH] Don't open joystick if it's not enabled in ChangeJoystick --- src/app/app.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index fcd38128..6840b2da 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -781,7 +781,10 @@ bool CApplication::ChangeJoystick(const JoystickDevice &newJoystick) if (m_private->joystick != nullptr) CloseJoystick(); - return OpenJoystick(); + if (m_joystickEnabled) + return OpenJoystick(); + else + return true; } Uint32 JoystickTimerCallback(Uint32 interval, void *)