diff options
| author | 2024-02-16 13:11:36 -0500 | |
|---|---|---|
| committer | 2024-02-16 13:11:36 -0500 | |
| commit | c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9 (patch) | |
| tree | 59e23eb8b42ec44318ca00f8972a33fe7181984c /src/hid_core | |
| parent | Merge pull request #13011 from liamwhite/vi-ipc (diff) | |
| parent | service: set: Migrate ISystemSettingsServer to new IPC (diff) | |
| download | yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.gz yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.tar.xz yuzu-c7588c042ba14bce871d12f5cf4dbf64bb5b3fe9.zip | |
Merge pull request #13016 from german77/set-interface2
service: set: Migrate ISystemSettingsServer to new IPC
Diffstat (limited to 'src/hid_core')
| -rw-r--r-- | src/hid_core/resources/hid_firmware_settings.cpp | 37 | ||||
| -rw-r--r-- | src/hid_core/resources/npad/npad_vibration.cpp | 6 | ||||
| -rw-r--r-- | src/hid_core/resources/touch_screen/touch_screen_resource.cpp | 2 |
3 files changed, 23 insertions, 22 deletions
diff --git a/src/hid_core/resources/hid_firmware_settings.cpp b/src/hid_core/resources/hid_firmware_settings.cpp index b32c0660a..c0a76d0eb 100644 --- a/src/hid_core/resources/hid_firmware_settings.cpp +++ b/src/hid_core/resources/hid_firmware_settings.cpp | |||
| @@ -22,29 +22,30 @@ void HidFirmwareSettings::LoadSettings(bool reload_config) { | |||
| 22 | return; | 22 | return; |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | m_set_sys->GetSettingsItemValue<bool>(is_debug_pad_enabled, "hid_debug", "enables_debugpad"); | 25 | m_set_sys->GetSettingsItemValueImpl<bool>(is_debug_pad_enabled, "hid_debug", |
| 26 | m_set_sys->GetSettingsItemValue<bool>(is_device_managed, "hid_debug", "manages_devices"); | 26 | "enables_debugpad"); |
| 27 | m_set_sys->GetSettingsItemValue<bool>(is_touch_i2c_managed, "hid_debug", | 27 | m_set_sys->GetSettingsItemValueImpl<bool>(is_device_managed, "hid_debug", "manages_devices"); |
| 28 | "manages_touch_ic_i2c"); | 28 | m_set_sys->GetSettingsItemValueImpl<bool>(is_touch_i2c_managed, "hid_debug", |
| 29 | m_set_sys->GetSettingsItemValue<bool>(is_future_devices_emulated, "hid_debug", | 29 | "manages_touch_ic_i2c"); |
| 30 | "emulate_future_device"); | 30 | m_set_sys->GetSettingsItemValueImpl<bool>(is_future_devices_emulated, "hid_debug", |
| 31 | m_set_sys->GetSettingsItemValue<bool>(is_mcu_hardware_error_emulated, "hid_debug", | 31 | "emulate_future_device"); |
| 32 | "emulate_mcu_hardware_error"); | 32 | m_set_sys->GetSettingsItemValueImpl<bool>(is_mcu_hardware_error_emulated, "hid_debug", |
| 33 | m_set_sys->GetSettingsItemValue<bool>(is_rail_enabled, "hid_debug", "enables_rail"); | 33 | "emulate_mcu_hardware_error"); |
| 34 | m_set_sys->GetSettingsItemValue<bool>(is_firmware_update_failure_emulated, "hid_debug", | 34 | m_set_sys->GetSettingsItemValueImpl<bool>(is_rail_enabled, "hid_debug", "enables_rail"); |
| 35 | "emulate_firmware_update_failure"); | 35 | m_set_sys->GetSettingsItemValueImpl<bool>(is_firmware_update_failure_emulated, "hid_debug", |
| 36 | "emulate_firmware_update_failure"); | ||
| 36 | is_firmware_update_failure = {}; | 37 | is_firmware_update_failure = {}; |
| 37 | m_set_sys->GetSettingsItemValue<bool>(is_ble_disabled, "hid_debug", "ble_disabled"); | 38 | m_set_sys->GetSettingsItemValueImpl<bool>(is_ble_disabled, "hid_debug", "ble_disabled"); |
| 38 | m_set_sys->GetSettingsItemValue<bool>(is_dscale_disabled, "hid_debug", "dscale_disabled"); | 39 | m_set_sys->GetSettingsItemValueImpl<bool>(is_dscale_disabled, "hid_debug", "dscale_disabled"); |
| 39 | m_set_sys->GetSettingsItemValue<bool>(is_handheld_forced, "hid_debug", "force_handheld"); | 40 | m_set_sys->GetSettingsItemValueImpl<bool>(is_handheld_forced, "hid_debug", "force_handheld"); |
| 40 | features_per_id_disabled = {}; | 41 | features_per_id_disabled = {}; |
| 41 | m_set_sys->GetSettingsItemValue<bool>(is_touch_firmware_auto_update_disabled, "hid_debug", | 42 | m_set_sys->GetSettingsItemValueImpl<bool>(is_touch_firmware_auto_update_disabled, "hid_debug", |
| 42 | "touch_firmware_auto_update_disabled"); | 43 | "touch_firmware_auto_update_disabled"); |
| 43 | 44 | ||
| 44 | bool has_rail_interface{}; | 45 | bool has_rail_interface{}; |
| 45 | bool has_sio_mcu{}; | 46 | bool has_sio_mcu{}; |
| 46 | m_set_sys->GetSettingsItemValue<bool>(has_rail_interface, "hid", "has_rail_interface"); | 47 | m_set_sys->GetSettingsItemValueImpl<bool>(has_rail_interface, "hid", "has_rail_interface"); |
| 47 | m_set_sys->GetSettingsItemValue<bool>(has_sio_mcu, "hid", "has_sio_mcu"); | 48 | m_set_sys->GetSettingsItemValueImpl<bool>(has_sio_mcu, "hid", "has_sio_mcu"); |
| 48 | platform_config.has_rail_interface.Assign(has_rail_interface); | 49 | platform_config.has_rail_interface.Assign(has_rail_interface); |
| 49 | platform_config.has_sio_mcu.Assign(has_sio_mcu); | 50 | platform_config.has_sio_mcu.Assign(has_sio_mcu); |
| 50 | 51 | ||
diff --git a/src/hid_core/resources/npad/npad_vibration.cpp b/src/hid_core/resources/npad/npad_vibration.cpp index 02b1f0290..4c103889a 100644 --- a/src/hid_core/resources/npad/npad_vibration.cpp +++ b/src/hid_core/resources/npad/npad_vibration.cpp | |||
| @@ -15,7 +15,7 @@ Result NpadVibration::Activate() { | |||
| 15 | std::scoped_lock lock{mutex}; | 15 | std::scoped_lock lock{mutex}; |
| 16 | 16 | ||
| 17 | f32 master_volume = 1.0f; | 17 | f32 master_volume = 1.0f; |
| 18 | m_set_sys->GetVibrationMasterVolume(master_volume); | 18 | m_set_sys->GetVibrationMasterVolume(&master_volume); |
| 19 | if (master_volume < 0.0f || master_volume > 1.0f) { | 19 | if (master_volume < 0.0f || master_volume > 1.0f) { |
| 20 | return ResultVibrationStrengthOutOfRange; | 20 | return ResultVibrationStrengthOutOfRange; |
| 21 | } | 21 | } |
| @@ -57,7 +57,7 @@ Result NpadVibration::GetVibrationMasterVolume(f32& out_volume) const { | |||
| 57 | std::scoped_lock lock{mutex}; | 57 | std::scoped_lock lock{mutex}; |
| 58 | 58 | ||
| 59 | f32 master_volume = 1.0f; | 59 | f32 master_volume = 1.0f; |
| 60 | m_set_sys->GetVibrationMasterVolume(master_volume); | 60 | m_set_sys->GetVibrationMasterVolume(&master_volume); |
| 61 | if (master_volume < 0.0f || master_volume > 1.0f) { | 61 | if (master_volume < 0.0f || master_volume > 1.0f) { |
| 62 | return ResultVibrationStrengthOutOfRange; | 62 | return ResultVibrationStrengthOutOfRange; |
| 63 | } | 63 | } |
| @@ -77,7 +77,7 @@ Result NpadVibration::EndPermitVibrationSession() { | |||
| 77 | std::scoped_lock lock{mutex}; | 77 | std::scoped_lock lock{mutex}; |
| 78 | 78 | ||
| 79 | f32 master_volume = 1.0f; | 79 | f32 master_volume = 1.0f; |
| 80 | m_set_sys->GetVibrationMasterVolume(master_volume); | 80 | m_set_sys->GetVibrationMasterVolume(&master_volume); |
| 81 | if (master_volume < 0.0f || master_volume > 1.0f) { | 81 | if (master_volume < 0.0f || master_volume > 1.0f) { |
| 82 | return ResultVibrationStrengthOutOfRange; | 82 | return ResultVibrationStrengthOutOfRange; |
| 83 | } | 83 | } |
diff --git a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp index c39321915..79ddaa4df 100644 --- a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp +++ b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp | |||
| @@ -48,7 +48,7 @@ Result TouchResource::ActivateTouch() { | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | Set::TouchScreenMode touch_mode{Set::TouchScreenMode::Standard}; | 50 | Set::TouchScreenMode touch_mode{Set::TouchScreenMode::Standard}; |
| 51 | m_set_sys->GetTouchScreenMode(touch_mode); | 51 | m_set_sys->GetTouchScreenMode(&touch_mode); |
| 52 | default_touch_screen_mode = static_cast<Core::HID::TouchScreenModeForNx>(touch_mode); | 52 | default_touch_screen_mode = static_cast<Core::HID::TouchScreenModeForNx>(touch_mode); |
| 53 | 53 | ||
| 54 | global_ref_counter++; | 54 | global_ref_counter++; |