From f3b739341ee5ad000e8c58b971ed7e273dd9870e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 13 Nov 2014 01:11:43 -0800 Subject: [PATCH] HW: Remove UpdateOutput All of the rumble interfaces are now immediate mode. --- Source/Core/Core/HW/GCPad.cpp | 1 - Source/Core/Core/HW/Wiimote.cpp | 1 - .../ControllerInterface.cpp | 24 ------------------- .../ControllerInterface/ControllerInterface.h | 1 - .../InputCommon/ControllerInterface/Device.h | 1 - 5 files changed, 28 deletions(-) diff --git a/Source/Core/Core/HW/GCPad.cpp b/Source/Core/Core/HW/GCPad.cpp index ba3aa28cde..b765ff67e1 100644 --- a/Source/Core/Core/HW/GCPad.cpp +++ b/Source/Core/Core/HW/GCPad.cpp @@ -69,7 +69,6 @@ void GetStatus(u8 _numPAD, GCPadStatus* _pPADStatus) static int _last_numPAD = 4; if (_numPAD <= _last_numPAD) { - g_controller_interface.UpdateOutput(); g_controller_interface.UpdateInput(); } _last_numPAD = _numPAD; diff --git a/Source/Core/Core/HW/Wiimote.cpp b/Source/Core/Core/HW/Wiimote.cpp index 0f1870aad9..74ecaef1e7 100644 --- a/Source/Core/Core/HW/Wiimote.cpp +++ b/Source/Core/Core/HW/Wiimote.cpp @@ -117,7 +117,6 @@ void Update(int _number) if (_number <= s_last_number) { - g_controller_interface.UpdateOutput(); g_controller_interface.UpdateInput(); } s_last_number = _number; diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp index 74aa6de3a3..3eb1b95ff2 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.cpp @@ -98,9 +98,6 @@ void ControllerInterface::Shutdown() for (ciface::Core::Device::Output* o : d->Outputs()) o->SetState(0); - // Update output - d->UpdateOutput(); - // Delete device delete d; } @@ -146,22 +143,6 @@ void ControllerInterface::UpdateInput() d->UpdateInput(); } -// -// UpdateOutput -// -// Update output for all devices, return true if all devices returned successful -// -void ControllerInterface::UpdateOutput() -{ - std::unique_lock lk(update_lock, std::defer_lock); - - if (!lk.try_lock()) - return; - - for (ciface::Core::Device* d : m_devices) - d->UpdateOutput(); -} - // // InputReference :: State // @@ -278,14 +259,9 @@ ciface::Core::Device::Control* ControllerInterface::OutputReference::Detect(cons // this loop is to make stuff like flashing keyboard LEDs work while (ms > (slept += 10)) - { - // TODO: improve this to update more than just the default device's output - device->UpdateOutput(); Common::SleepCurrentThread(10); - } State(0); - device->UpdateOutput(); } return nullptr; } diff --git a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h index 9600aded63..9ab8427ad2 100644 --- a/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h +++ b/Source/Core/InputCommon/ControllerInterface/ControllerInterface.h @@ -121,7 +121,6 @@ public: void UpdateReference(ControlReference* control, const ciface::Core::DeviceQualifier& default_device) const; void UpdateInput(); - void UpdateOutput(); std::recursive_mutex update_lock; diff --git a/Source/Core/InputCommon/ControllerInterface/Device.h b/Source/Core/InputCommon/ControllerInterface/Device.h index 6f54f9adf5..fa536e4116 100644 --- a/Source/Core/InputCommon/ControllerInterface/Device.h +++ b/Source/Core/InputCommon/ControllerInterface/Device.h @@ -101,7 +101,6 @@ public: virtual int GetId() const = 0; virtual std::string GetSource() const = 0; virtual void UpdateInput() {} - virtual void UpdateOutput() {} const std::vector& Inputs() const { return m_inputs; } const std::vector& Outputs() const { return m_outputs; }