diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/settings.cpp | 3 | ||||
| -rw-r--r-- | src/common/settings.h | 6 | ||||
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 12 | ||||
| -rw-r--r-- | src/input_common/udp/client.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_advanced.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input_advanced.ui | 16 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 3 |
8 files changed, 35 insertions, 11 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index fd3b639cd..aa4613d08 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -72,6 +72,9 @@ void LogSettings() { | |||
| 72 | log_setting("Debugging_ProgramArgs", values.program_args.GetValue()); | 72 | log_setting("Debugging_ProgramArgs", values.program_args.GetValue()); |
| 73 | log_setting("Services_BCATBackend", values.bcat_backend.GetValue()); | 73 | log_setting("Services_BCATBackend", values.bcat_backend.GetValue()); |
| 74 | log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local.GetValue()); | 74 | log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local.GetValue()); |
| 75 | log_setting("Input_EnableMotion", values.motion_enabled.GetValue()); | ||
| 76 | log_setting("Input_EnableVibration", values.vibration_enabled.GetValue()); | ||
| 77 | log_setting("Input_EnableRawInput", values.enable_raw_input.GetValue()); | ||
| 75 | } | 78 | } |
| 76 | 79 | ||
| 77 | bool IsConfiguringGlobal() { | 80 | bool IsConfiguringGlobal() { |
diff --git a/src/common/settings.h b/src/common/settings.h index ec4d381e8..34065e937 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "common/common_types.h" | 17 | #include "common/common_types.h" |
| 18 | #include "common/settings_input.h" | 18 | #include "common/settings_input.h" |
| 19 | #include "input_common/udp/client.h" | ||
| 20 | 19 | ||
| 21 | namespace Settings { | 20 | namespace Settings { |
| 22 | 21 | ||
| @@ -498,14 +497,15 @@ struct Values { | |||
| 498 | 497 | ||
| 499 | Setting<bool> use_docked_mode{true, "use_docked_mode"}; | 498 | Setting<bool> use_docked_mode{true, "use_docked_mode"}; |
| 500 | 499 | ||
| 500 | BasicSetting<bool> enable_raw_input{false, "enable_raw_input"}; | ||
| 501 | |||
| 501 | Setting<bool> vibration_enabled{true, "vibration_enabled"}; | 502 | Setting<bool> vibration_enabled{true, "vibration_enabled"}; |
| 502 | Setting<bool> enable_accurate_vibrations{false, "enable_accurate_vibrations"}; | 503 | Setting<bool> enable_accurate_vibrations{false, "enable_accurate_vibrations"}; |
| 503 | 504 | ||
| 504 | Setting<bool> motion_enabled{true, "motion_enabled"}; | 505 | Setting<bool> motion_enabled{true, "motion_enabled"}; |
| 505 | BasicSetting<std::string> motion_device{"engine:motion_emu,update_period:100,sensitivity:0.01", | 506 | BasicSetting<std::string> motion_device{"engine:motion_emu,update_period:100,sensitivity:0.01", |
| 506 | "motion_device"}; | 507 | "motion_device"}; |
| 507 | BasicSetting<std::string> udp_input_servers{InputCommon::CemuhookUDP::DEFAULT_SRV, | 508 | BasicSetting<std::string> udp_input_servers{"127.0.0.1:26760", "udp_input_servers"}; |
| 508 | "udp_input_servers"}; | ||
| 509 | 509 | ||
| 510 | BasicSetting<bool> mouse_panning{false, "mouse_panning"}; | 510 | BasicSetting<bool> mouse_panning{false, "mouse_panning"}; |
| 511 | BasicRangedSetting<u8> mouse_panning_sensitivity{10, 1, 100, "mouse_panning_sensitivity"}; | 511 | BasicRangedSetting<u8> mouse_panning_sensitivity{10, 1, 100, "mouse_panning_sensitivity"}; |
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; |
diff --git a/src/input_common/udp/client.h b/src/input_common/udp/client.h index a11ea3068..380f9bb76 100644 --- a/src/input_common/udp/client.h +++ b/src/input_common/udp/client.h | |||
| @@ -21,8 +21,6 @@ | |||
| 21 | 21 | ||
| 22 | namespace InputCommon::CemuhookUDP { | 22 | namespace InputCommon::CemuhookUDP { |
| 23 | 23 | ||
| 24 | constexpr char DEFAULT_SRV[] = "127.0.0.1:26760"; | ||
| 25 | |||
| 26 | class Socket; | 24 | class Socket; |
| 27 | 25 | ||
| 28 | namespace Response { | 26 | namespace Response { |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 85d292bcc..700c162ea 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -560,6 +560,7 @@ void Config::ReadControlValues() { | |||
| 560 | ReadTouchscreenValues(); | 560 | ReadTouchscreenValues(); |
| 561 | ReadMotionTouchValues(); | 561 | ReadMotionTouchValues(); |
| 562 | 562 | ||
| 563 | ReadBasicSetting(Settings::values.enable_raw_input); | ||
| 563 | ReadBasicSetting(Settings::values.emulate_analog_keyboard); | 564 | ReadBasicSetting(Settings::values.emulate_analog_keyboard); |
| 564 | Settings::values.mouse_panning = false; | 565 | Settings::values.mouse_panning = false; |
| 565 | ReadBasicSetting(Settings::values.mouse_panning_sensitivity); | 566 | ReadBasicSetting(Settings::values.mouse_panning_sensitivity); |
| @@ -1184,6 +1185,7 @@ void Config::SaveControlValues() { | |||
| 1184 | WriteGlobalSetting(Settings::values.vibration_enabled); | 1185 | WriteGlobalSetting(Settings::values.vibration_enabled); |
| 1185 | WriteGlobalSetting(Settings::values.enable_accurate_vibrations); | 1186 | WriteGlobalSetting(Settings::values.enable_accurate_vibrations); |
| 1186 | WriteGlobalSetting(Settings::values.motion_enabled); | 1187 | WriteGlobalSetting(Settings::values.motion_enabled); |
| 1188 | WriteBasicSetting(Settings::values.enable_raw_input); | ||
| 1187 | WriteBasicSetting(Settings::values.keyboard_enabled); | 1189 | WriteBasicSetting(Settings::values.keyboard_enabled); |
| 1188 | WriteBasicSetting(Settings::values.emulate_analog_keyboard); | 1190 | WriteBasicSetting(Settings::values.emulate_analog_keyboard); |
| 1189 | WriteBasicSetting(Settings::values.mouse_panning_sensitivity); | 1191 | WriteBasicSetting(Settings::values.mouse_panning_sensitivity); |
diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp index 2f1419b5b..d20fd86b6 100644 --- a/src/yuzu/configuration/configure_input_advanced.cpp +++ b/src/yuzu/configuration/configure_input_advanced.cpp | |||
| @@ -126,6 +126,7 @@ void ConfigureInputAdvanced::ApplyConfiguration() { | |||
| 126 | Settings::values.mouse_panning_sensitivity = | 126 | Settings::values.mouse_panning_sensitivity = |
| 127 | static_cast<float>(ui->mouse_panning_sensitivity->value()); | 127 | static_cast<float>(ui->mouse_panning_sensitivity->value()); |
| 128 | Settings::values.touchscreen.enabled = ui->touchscreen_enabled->isChecked(); | 128 | Settings::values.touchscreen.enabled = ui->touchscreen_enabled->isChecked(); |
| 129 | Settings::values.enable_raw_input = ui->enable_raw_input->isChecked(); | ||
| 129 | } | 130 | } |
| 130 | 131 | ||
| 131 | void ConfigureInputAdvanced::LoadConfiguration() { | 132 | void ConfigureInputAdvanced::LoadConfiguration() { |
| @@ -155,6 +156,7 @@ void ConfigureInputAdvanced::LoadConfiguration() { | |||
| 155 | ui->mouse_panning->setChecked(Settings::values.mouse_panning.GetValue()); | 156 | ui->mouse_panning->setChecked(Settings::values.mouse_panning.GetValue()); |
| 156 | ui->mouse_panning_sensitivity->setValue(Settings::values.mouse_panning_sensitivity.GetValue()); | 157 | ui->mouse_panning_sensitivity->setValue(Settings::values.mouse_panning_sensitivity.GetValue()); |
| 157 | ui->touchscreen_enabled->setChecked(Settings::values.touchscreen.enabled); | 158 | ui->touchscreen_enabled->setChecked(Settings::values.touchscreen.enabled); |
| 159 | ui->enable_raw_input->setChecked(Settings::values.enable_raw_input.GetValue()); | ||
| 158 | 160 | ||
| 159 | UpdateUIEnabled(); | 161 | UpdateUIEnabled(); |
| 160 | } | 162 | } |
diff --git a/src/yuzu/configuration/configure_input_advanced.ui b/src/yuzu/configuration/configure_input_advanced.ui index d3ef5bd06..9095206a0 100644 --- a/src/yuzu/configuration/configure_input_advanced.ui +++ b/src/yuzu/configuration/configure_input_advanced.ui | |||
| @@ -2672,6 +2672,22 @@ | |||
| 2672 | </property> | 2672 | </property> |
| 2673 | </widget> | 2673 | </widget> |
| 2674 | </item> | 2674 | </item> |
| 2675 | <item row="9" column="0"> | ||
| 2676 | <widget class="QCheckBox" name="enable_raw_input"> | ||
| 2677 | <property name="toolTip"> | ||
| 2678 | <string>Requires restarting yuzu</string> | ||
| 2679 | </property> | ||
| 2680 | <property name="minimumSize"> | ||
| 2681 | <size> | ||
| 2682 | <width>0</width> | ||
| 2683 | <height>23</height> | ||
| 2684 | </size> | ||
| 2685 | </property> | ||
| 2686 | <property name="text"> | ||
| 2687 | <string>Enable XInput 8 player support (disables web applet)</string> | ||
| 2688 | </property> | ||
| 2689 | </widget> | ||
| 2690 | </item> | ||
| 2675 | </layout> | 2691 | </layout> |
| 2676 | </widget> | 2692 | </widget> |
| 2677 | </item> | 2693 | </item> |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e36774cc6..e129707e9 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -557,7 +557,8 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url, | |||
| 557 | const std::string& additional_args, bool is_local) { | 557 | const std::string& additional_args, bool is_local) { |
| 558 | #ifdef YUZU_USE_QT_WEB_ENGINE | 558 | #ifdef YUZU_USE_QT_WEB_ENGINE |
| 559 | 559 | ||
| 560 | if (disable_web_applet) { | 560 | // Raw input breaks with the web applet, Disable web applets if enabled |
| 561 | if (disable_web_applet || Settings::values.enable_raw_input) { | ||
| 561 | emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed, | 562 | emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed, |
| 562 | "http://localhost/"); | 563 | "http://localhost/"); |
| 563 | return; | 564 | return; |