diff options
| author | 2022-12-26 11:11:01 -0600 | |
|---|---|---|
| committer | 2023-01-19 18:05:22 -0600 | |
| commit | 527dad70976a158e94defc51707347e064a31099 (patch) | |
| tree | d9e9e68799d0c051e8e6a8a2dda7170ea911831d /src/core/hid/emulated_controller.cpp | |
| parent | Address review comments (diff) | |
| download | yuzu-527dad70976a158e94defc51707347e064a31099.tar.gz yuzu-527dad70976a158e94defc51707347e064a31099.tar.xz yuzu-527dad70976a158e94defc51707347e064a31099.zip | |
input_common: Use DriverResult on all engines
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
| -rw-r--r-- | src/core/hid/emulated_controller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 1ed57f949..62da5be6c 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -1178,7 +1178,7 @@ bool EmulatedController::SetVibration(std::size_t device_index, VibrationValue v | |||
| 1178 | .type = type, | 1178 | .type = type, |
| 1179 | }; | 1179 | }; |
| 1180 | return output_devices[device_index]->SetVibration(status) == | 1180 | return output_devices[device_index]->SetVibration(status) == |
| 1181 | Common::Input::VibrationError::None; | 1181 | Common::Input::DriverResult::Success; |
| 1182 | } | 1182 | } |
| 1183 | 1183 | ||
| 1184 | bool EmulatedController::IsVibrationEnabled(std::size_t device_index) { | 1184 | bool EmulatedController::IsVibrationEnabled(std::size_t device_index) { |
| @@ -1208,8 +1208,8 @@ bool EmulatedController::SetPollingMode(Common::Input::PollingMode polling_mode) | |||
| 1208 | const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); | 1208 | const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); |
| 1209 | const auto mapped_nfc_result = output_device->SetPollingMode(polling_mode); | 1209 | const auto mapped_nfc_result = output_device->SetPollingMode(polling_mode); |
| 1210 | 1210 | ||
| 1211 | return virtual_nfc_result == Common::Input::PollingError::None || | 1211 | return virtual_nfc_result == Common::Input::DriverResult::Success || |
| 1212 | mapped_nfc_result == Common::Input::PollingError::None; | 1212 | mapped_nfc_result == Common::Input::DriverResult::Success; |
| 1213 | } | 1213 | } |
| 1214 | 1214 | ||
| 1215 | bool EmulatedController::SetCameraFormat( | 1215 | bool EmulatedController::SetCameraFormat( |
| @@ -1220,13 +1220,13 @@ bool EmulatedController::SetCameraFormat( | |||
| 1220 | auto& camera_output_device = output_devices[2]; | 1220 | auto& camera_output_device = output_devices[2]; |
| 1221 | 1221 | ||
| 1222 | if (right_output_device->SetCameraFormat(static_cast<Common::Input::CameraFormat>( | 1222 | if (right_output_device->SetCameraFormat(static_cast<Common::Input::CameraFormat>( |
| 1223 | camera_format)) == Common::Input::CameraError::None) { | 1223 | camera_format)) == Common::Input::DriverResult::Success) { |
| 1224 | return true; | 1224 | return true; |
| 1225 | } | 1225 | } |
| 1226 | 1226 | ||
| 1227 | // Fallback to Qt camera if native device doesn't have support | 1227 | // Fallback to Qt camera if native device doesn't have support |
| 1228 | return camera_output_device->SetCameraFormat(static_cast<Common::Input::CameraFormat>( | 1228 | return camera_output_device->SetCameraFormat(static_cast<Common::Input::CameraFormat>( |
| 1229 | camera_format)) == Common::Input::CameraError::None; | 1229 | camera_format)) == Common::Input::DriverResult::Success; |
| 1230 | } | 1230 | } |
| 1231 | 1231 | ||
| 1232 | Common::ParamPackage EmulatedController::GetRingParam() const { | 1232 | Common::ParamPackage EmulatedController::GetRingParam() const { |