From 5aa208e26417a455abced9c067f75e1b81f2cb80 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 24 Jun 2023 18:48:45 -0600 Subject: input_common: Dont try to read/write data from 3rd party controllers --- src/core/hid/emulated_controller.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/hid') diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index c937495f9..190f7c906 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1250,6 +1250,11 @@ Common::Input::DriverResult EmulatedController::SetPollingMode( const auto virtual_nfc_result = nfc_output_device->SetPollingMode(polling_mode); const auto mapped_nfc_result = right_output_device->SetPollingMode(polling_mode); + // Restore previous state + if (mapped_nfc_result != Common::Input::DriverResult::Success) { + right_output_device->SetPollingMode(Common::Input::PollingMode::Active); + } + if (virtual_nfc_result == Common::Input::DriverResult::Success) { return virtual_nfc_result; } -- cgit v1.2.3