summaryrefslogtreecommitdiff
path: root/src/input_common/sdl/sdl_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
-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 8723acc31..ab6211b29 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"
@@ -903,8 +903,10 @@ SDLState::SDLState() {
903 RegisterFactory<VibrationDevice>("sdl", vibration_factory); 903 RegisterFactory<VibrationDevice>("sdl", vibration_factory);
904 RegisterFactory<MotionDevice>("sdl", motion_factory); 904 RegisterFactory<MotionDevice>("sdl", motion_factory);
905 905
906 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens 906 if (!Settings::values.enable_raw_input) {
907 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); 907 // Disable raw input. When enabled this setting causes SDL to die when a web applet opens
908 SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0");
909 }
908 910
909 // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers 911 // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers
910 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1"); 912 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
@@ -912,10 +914,10 @@ SDLState::SDLState() {
912 914
913 // Tell SDL2 to use the hidapi driver. This will allow joycons to be detected as a 915 // Tell SDL2 to use the hidapi driver. This will allow joycons to be detected as a
914 // GameController and not a generic one 916 // GameController and not a generic one
915 SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1"); 917 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1");
916 918
917 // Turn off Pro controller home led 919 // Turn off Pro controller home led
918 SDL_SetHint("SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED", "0"); 920 SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, "0");
919 921
920 // If the frontend is going to manage the event loop, then we don't start one here 922 // If the frontend is going to manage the event loop, then we don't start one here
921 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK) == 0; 923 start_thread = SDL_WasInit(SDL_INIT_JOYSTICK) == 0;