summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorGravatar german772022-12-26 12:49:49 -0600
committerGravatar Narr the Reg2023-01-19 18:05:22 -0600
commit5cb437703fa441a08db295f8a916caedc3a581f2 (patch)
tree148c35e47d18462f0b8f8e116e2247b4cbfdbde2 /src/core/hid/emulated_controller.cpp
parentinput_common: Use DriverResult on all engines (diff)
downloadyuzu-5cb437703fa441a08db295f8a916caedc3a581f2.tar.gz
yuzu-5cb437703fa441a08db295f8a916caedc3a581f2.tar.xz
yuzu-5cb437703fa441a08db295f8a916caedc3a581f2.zip
yuzu: Add ring controller test button
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 62da5be6c..915ffa490 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -1200,7 +1200,8 @@ bool EmulatedController::IsVibrationEnabled(std::size_t device_index) {
1200 return output_devices[device_index]->IsVibrationEnabled(); 1200 return output_devices[device_index]->IsVibrationEnabled();
1201} 1201}
1202 1202
1203bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode) { 1203Common::Input::DriverResult EmulatedController::SetPollingMode(
1204 Common::Input::PollingMode polling_mode) {
1204 LOG_INFO(Service_HID, "Set polling mode {}", polling_mode); 1205 LOG_INFO(Service_HID, "Set polling mode {}", polling_mode);
1205 auto& output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)]; 1206 auto& output_device = output_devices[static_cast<std::size_t>(DeviceIndex::Right)];
1206 auto& nfc_output_device = output_devices[3]; 1207 auto& nfc_output_device = output_devices[3];
@@ -1208,8 +1209,11 @@ bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode)
1208 const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); 1209 const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode);
1209 const auto mapped_nfc_result = output_device->SetPollingMode(polling_mode); 1210 const auto mapped_nfc_result = output_device->SetPollingMode(polling_mode);
1210 1211
1211 return virtual_nfc_result == Common::Input::DriverResult::Success || 1212 if (virtual_nfc_result == Common::Input::DriverResult::Success) {
1212 mapped_nfc_result == Common::Input::DriverResult::Success; 1213 return virtual_nfc_result;
1214 }
1215
1216 return mapped_nfc_result;
1213} 1217}
1214 1218
1215bool EmulatedController::SetCameraFormat( 1219bool EmulatedController::SetCameraFormat(