summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
authorGravatar german772021-09-01 18:48:01 -0500
committerGravatar german772021-09-10 00:58:12 -0500
commit5798537ce431481f44e3335a1a291b733bd719ad (patch)
tree16aa3dcf2c0f76b74ac47b22feb7b23ac10b3280 /src/input_common/sdl/sdl_impl.cpp
parentMerge pull request #6965 from bunnei/cpu_manager_jthread (diff)
downloadyuzu-5798537ce431481f44e3335a1a291b733bd719ad.tar.gz
yuzu-5798537ce431481f44e3335a1a291b733bd719ad.tar.xz
yuzu-5798537ce431481f44e3335a1a291b733bd719ad.zip
input_common: Enable steam controllers and 8 player support
Diffstat (limited to '')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index f102410d1..03888b7cb 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -21,7 +21,7 @@
21#include "common/logging/log.h" 21#include "common/logging/log.h"
22#include "common/math_util.h" 22#include "common/math_util.h"
23#include "common/param_package.h" 23#include "common/param_package.h"
24#include "common/settings_input.h" 24#include "common/settings.h"
25#include "common/threadsafe_queue.h" 25#include "common/threadsafe_queue.h"
26#include "core/frontend/input.h" 26#include "core/frontend/input.h"
27#include "input_common/motion_input.h" 27#include "input_common/motion_input.h"
@@ -889,8 +889,10 @@ SDLState::SDLState() {
889 RegisterFactory<VibrationDevice>("sdl", vibration_factory); 889 RegisterFactory<VibrationDevice>("sdl", vibration_factory);
890 RegisterFactory<MotionDevice>("sdl", motion_factory); 890 RegisterFactory<MotionDevice>("sdl", motion_factory);
891 891
892 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens 892 if (!Settings::values.enable_raw_input) {
893 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); 893 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens
894 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");
895 }
894 896
895 // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers 897 // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers
896 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1"); 898 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
@@ -898,10 +900,10 @@ SDLState::SDLState() {
898 900
899 // Tell SDL2 to use the hidapi driver. This will allow joycons to be detected as a 901 // Tell SDL2 to use the hidapi driver. This will allow joycons to be detected as a
900 // GameController and not a generic one 902 // GameController and not a generic one
901 SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1"); 903 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
902 904
903 // Turn off Pro controller home led 905 // Turn off Pro controller home led
904 SDL_SetHint("SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED", "0"); 906 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, "0");
905 907
906 // If the frontend is going to manage the event loop, then we don't start one here 908 // If the frontend is going to manage the event loop, then we don't start one here
907 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK) == 0; 909 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK) == 0;