mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-11-15 02:19:22 +01:00
RMG-Input: add 'SDL controller mode' option
This commit is contained in:
1 parent
e112e324f7
commit
9b5cc05b9f
3 files changed
+60
-2
No files matched your search
@@ -139,12 +139,14 @@ void MainDialog::openInputDevice(QString deviceName, int deviceNum)
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_IsGameController(deviceNum) == SDL_TRUE)
|
||||
int controllerMode = CoreSettingsGetIntValue(SettingsID::Input_ControllerMode);
|
||||
if ((controllerMode == 0 && SDL_IsGameController(deviceNum) == SDL_TRUE) ||
|
||||
(controllerMode == 2))
|
||||
{
|
||||
this->currentJoystick = nullptr;
|
||||
this->currentController = SDL_GameControllerOpen(deviceNum);
|
||||
}
|
||||
else
|
||||
else if (controllerMode == 0 || controllerMode == 1)
|
||||
{
|
||||
this->currentJoystick = SDL_JoystickOpen(deviceNum);
|
||||
this->currentController = nullptr;
|
||||
|
||||
Reference in new issue
Block a user