diff options
Diffstat (limited to 'src/input_common/drivers/gc_adapter.cpp')
| -rw-r--r-- | src/input_common/drivers/gc_adapter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 27a0ffb0d..826fa2109 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp | |||
| @@ -90,7 +90,7 @@ GCAdapter::~GCAdapter() { | |||
| 90 | 90 | ||
| 91 | void GCAdapter::AdapterInputThread(std::stop_token stop_token) { | 91 | void GCAdapter::AdapterInputThread(std::stop_token stop_token) { |
| 92 | LOG_DEBUG(Input, "Input thread started"); | 92 | LOG_DEBUG(Input, "Input thread started"); |
| 93 | Common::SetCurrentThreadName("yuzu:input:GCAdapter"); | 93 | Common::SetCurrentThreadName("GCAdapter"); |
| 94 | s32 payload_size{}; | 94 | s32 payload_size{}; |
| 95 | AdapterPayload adapter_payload{}; | 95 | AdapterPayload adapter_payload{}; |
| 96 | 96 | ||
| @@ -214,7 +214,7 @@ void GCAdapter::UpdateStateAxes(std::size_t port, const AdapterPayload& adapter_ | |||
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | void GCAdapter::AdapterScanThread(std::stop_token stop_token) { | 216 | void GCAdapter::AdapterScanThread(std::stop_token stop_token) { |
| 217 | Common::SetCurrentThreadName("yuzu:input:ScanGCAdapter"); | 217 | Common::SetCurrentThreadName("ScanGCAdapter"); |
| 218 | usb_adapter_handle = nullptr; | 218 | usb_adapter_handle = nullptr; |
| 219 | pads = {}; | 219 | pads = {}; |
| 220 | while (!stop_token.stop_requested() && !Setup()) { | 220 | while (!stop_token.stop_requested() && !Setup()) { |
| @@ -324,7 +324,7 @@ bool GCAdapter::GetGCEndpoint(libusb_device* device) { | |||
| 324 | return true; | 324 | return true; |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | Common::Input::VibrationError GCAdapter::SetRumble( | 327 | Common::Input::VibrationError GCAdapter::SetVibration( |
| 328 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { | 328 | const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) { |
| 329 | const auto mean_amplitude = (vibration.low_amplitude + vibration.high_amplitude) * 0.5f; | 329 | const auto mean_amplitude = (vibration.low_amplitude + vibration.high_amplitude) * 0.5f; |
| 330 | const auto processed_amplitude = | 330 | const auto processed_amplitude = |
| @@ -338,6 +338,10 @@ Common::Input::VibrationError GCAdapter::SetRumble( | |||
| 338 | return Common::Input::VibrationError::None; | 338 | return Common::Input::VibrationError::None; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | bool GCAdapter::IsVibrationEnabled([[maybe_unused]] const PadIdentifier& identifier) { | ||
| 342 | return rumble_enabled; | ||
| 343 | } | ||
| 344 | |||
| 341 | void GCAdapter::UpdateVibrations() { | 345 | void GCAdapter::UpdateVibrations() { |
| 342 | // Use 8 states to keep the switching between on/off fast enough for | 346 | // Use 8 states to keep the switching between on/off fast enough for |
| 343 | // a human to feel different vibration strenght | 347 | // a human to feel different vibration strenght |