diff options
| author | 2023-02-04 10:59:14 -0600 | |
|---|---|---|
| committer | 2023-02-04 11:05:57 -0600 | |
| commit | ebca59b8e9f7304e8880c3db64c383d9ddc4a7b8 (patch) | |
| tree | cb0535ad548f9ac2a4b612d4e8aa9ec7772bdb84 | |
| parent | yuzu_cmd: Fix touch input (diff) | |
| download | yuzu-ebca59b8e9f7304e8880c3db64c383d9ddc4a7b8.tar.gz yuzu-ebca59b8e9f7304e8880c3db64c383d9ddc4a7b8.tar.xz yuzu-ebca59b8e9f7304e8880c3db64c383d9ddc4a7b8.zip | |
yuzu_cmd: Fix mismatching controller input
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 13 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 527017282..9c34cdc6e 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -176,6 +176,9 @@ void Config::ReadValues() { | |||
| 176 | Settings::values.debug_pad_analogs[i] = default_param; | 176 | Settings::values.debug_pad_analogs[i] = default_param; |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | ReadSetting("ControlsGeneral", Settings::values.enable_raw_input); | ||
| 180 | ReadSetting("ControlsGeneral", Settings::values.enable_joycon_driver); | ||
| 181 | ReadSetting("ControlsGeneral", Settings::values.emulate_analog_keyboard); | ||
| 179 | ReadSetting("ControlsGeneral", Settings::values.vibration_enabled); | 182 | ReadSetting("ControlsGeneral", Settings::values.vibration_enabled); |
| 180 | ReadSetting("ControlsGeneral", Settings::values.enable_accurate_vibrations); | 183 | ReadSetting("ControlsGeneral", Settings::values.enable_accurate_vibrations); |
| 181 | ReadSetting("ControlsGeneral", Settings::values.motion_enabled); | 184 | ReadSetting("ControlsGeneral", Settings::values.motion_enabled); |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 67d230462..3f3651dbe 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -14,6 +14,7 @@ const char* sdl2_config_file = | |||
| 14 | # Escape characters $0 (for ':'), $1 (for ',') and $2 (for '$') can be used in values | 14 | # Escape characters $0 (for ':'), $1 (for ',') and $2 (for '$') can be used in values |
| 15 | 15 | ||
| 16 | # Indicates if this player should be connected at boot | 16 | # Indicates if this player should be connected at boot |
| 17 | # 0 (default): Disabled, 1: Enabled | ||
| 17 | connected= | 18 | connected= |
| 18 | 19 | ||
| 19 | # for button input, the following devices are available: | 20 | # for button input, the following devices are available: |
| @@ -94,6 +95,18 @@ motionright= | |||
| 94 | # 0 (default): Disabled, 1: Enabled | 95 | # 0 (default): Disabled, 1: Enabled |
| 95 | debug_pad_enabled = | 96 | debug_pad_enabled = |
| 96 | 97 | ||
| 98 | # Enable sdl raw input. Allows to configure up to 8 xinput controllers. | ||
| 99 | # 0 (default): Disabled, 1: Enabled | ||
| 100 | enable_raw_input = | ||
| 101 | |||
| 102 | # Enable yuzu joycon driver instead of SDL drive. | ||
| 103 | # 0: Disabled, 1 (default): Enabled | ||
| 104 | enable_joycon_driver = | ||
| 105 | |||
| 106 | # Emulates an analog input from buttons. Allowing to dial any angle. | ||
| 107 | # 0 (default): Disabled, 1: Enabled | ||
| 108 | emulate_analog_keyboard = | ||
| 109 | |||
| 97 | # Whether to enable or disable vibration | 110 | # Whether to enable or disable vibration |
| 98 | # 0: Disabled, 1 (default): Enabled | 111 | # 0: Disabled, 1 (default): Enabled |
| 99 | vibration_enabled= | 112 | vibration_enabled= |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index e2dfe3a9b..5450b8c38 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -18,11 +18,11 @@ | |||
| 18 | 18 | ||
| 19 | EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_) | 19 | EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_) |
| 20 | : input_subsystem{input_subsystem_}, system{system_} { | 20 | : input_subsystem{input_subsystem_}, system{system_} { |
| 21 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) { | 21 | input_subsystem->Initialize(); |
| 22 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0) { | ||
| 22 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); | 23 | LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting..."); |
| 23 | exit(1); | 24 | exit(1); |
| 24 | } | 25 | } |
| 25 | input_subsystem->Initialize(); | ||
| 26 | SDL_SetMainReady(); | 26 | SDL_SetMainReady(); |
| 27 | } | 27 | } |
| 28 | 28 | ||