diff options
author | german77 <juangerman-13@hotmail.com> | 2023-07-03 03:21:16 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2023-07-03 03:21:16 +0200 |
commit | 9cd698e8ad584a199048f072ed65986ee10ba31a (patch) | |
tree | 2959ccd4fd535565d4b7aa28d289ca3ecce461fa /src/core/hid/emulated_controller.cpp | |
parent | Merge pull request #10998 from Morph1984/qt-stop-messing-with-me (diff) | |
download | yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar.gz yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar.bz2 yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar.lz yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar.xz yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.tar.zst yuzu-9cd698e8ad584a199048f072ed65986ee10ba31a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hid/emulated_controller.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 1ebc32c1e..94bd656fe 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1243,10 +1243,12 @@ Common::Input::DriverResult EmulatedController::SetPollingMode( auto& nfc_output_device = output_devices[3]; if (device_index == EmulatedDeviceIndex::LeftIndex) { + controller.left_polling_mode = polling_mode; return left_output_device->SetPollingMode(polling_mode); } if (device_index == EmulatedDeviceIndex::RightIndex) { + controller.right_polling_mode = polling_mode; const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); const auto mapped_nfc_result = right_output_device->SetPollingMode(polling_mode); @@ -1261,12 +1263,22 @@ Common::Input::DriverResult EmulatedController::SetPollingMode( return mapped_nfc_result; } + controller.left_polling_mode = polling_mode; + controller.right_polling_mode = polling_mode; left_output_device->SetPollingMode(polling_mode); right_output_device->SetPollingMode(polling_mode); nfc_output_device->SetPollingMode(polling_mode); return Common::Input::DriverResult::Success; } +Common::Input::PollingMode EmulatedController::GetPollingMode( + EmulatedDeviceIndex device_index) const { + if (device_index == EmulatedDeviceIndex::LeftIndex) { + return controller.left_polling_mode; + } + return controller.right_polling_mode; +} + bool EmulatedController::SetCameraFormat( Core::IrSensor::ImageTransferProcessorFormat camera_format) { LOG_INFO(Service_HID, "Set camera format {}", camera_format); |