mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
HW: Remove UpdateOutput
All of the rumble interfaces are now immediate mode.
This commit is contained in:
parent
86e4da2c07
commit
f3b739341e
@ -69,7 +69,6 @@ void GetStatus(u8 _numPAD, GCPadStatus* _pPADStatus)
|
|||||||
static int _last_numPAD = 4;
|
static int _last_numPAD = 4;
|
||||||
if (_numPAD <= _last_numPAD)
|
if (_numPAD <= _last_numPAD)
|
||||||
{
|
{
|
||||||
g_controller_interface.UpdateOutput();
|
|
||||||
g_controller_interface.UpdateInput();
|
g_controller_interface.UpdateInput();
|
||||||
}
|
}
|
||||||
_last_numPAD = _numPAD;
|
_last_numPAD = _numPAD;
|
||||||
|
@ -117,7 +117,6 @@ void Update(int _number)
|
|||||||
|
|
||||||
if (_number <= s_last_number)
|
if (_number <= s_last_number)
|
||||||
{
|
{
|
||||||
g_controller_interface.UpdateOutput();
|
|
||||||
g_controller_interface.UpdateInput();
|
g_controller_interface.UpdateInput();
|
||||||
}
|
}
|
||||||
s_last_number = _number;
|
s_last_number = _number;
|
||||||
|
@ -98,9 +98,6 @@ void ControllerInterface::Shutdown()
|
|||||||
for (ciface::Core::Device::Output* o : d->Outputs())
|
for (ciface::Core::Device::Output* o : d->Outputs())
|
||||||
o->SetState(0);
|
o->SetState(0);
|
||||||
|
|
||||||
// Update output
|
|
||||||
d->UpdateOutput();
|
|
||||||
|
|
||||||
// Delete device
|
// Delete device
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
@ -146,22 +143,6 @@ void ControllerInterface::UpdateInput()
|
|||||||
d->UpdateInput();
|
d->UpdateInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// UpdateOutput
|
|
||||||
//
|
|
||||||
// Update output for all devices, return true if all devices returned successful
|
|
||||||
//
|
|
||||||
void ControllerInterface::UpdateOutput()
|
|
||||||
{
|
|
||||||
std::unique_lock<std::recursive_mutex> lk(update_lock, std::defer_lock);
|
|
||||||
|
|
||||||
if (!lk.try_lock())
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (ciface::Core::Device* d : m_devices)
|
|
||||||
d->UpdateOutput();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// InputReference :: State
|
// 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
|
// this loop is to make stuff like flashing keyboard LEDs work
|
||||||
while (ms > (slept += 10))
|
while (ms > (slept += 10))
|
||||||
{
|
|
||||||
// TODO: improve this to update more than just the default device's output
|
|
||||||
device->UpdateOutput();
|
|
||||||
Common::SleepCurrentThread(10);
|
Common::SleepCurrentThread(10);
|
||||||
}
|
|
||||||
|
|
||||||
State(0);
|
State(0);
|
||||||
device->UpdateOutput();
|
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,6 @@ public:
|
|||||||
|
|
||||||
void UpdateReference(ControlReference* control, const ciface::Core::DeviceQualifier& default_device) const;
|
void UpdateReference(ControlReference* control, const ciface::Core::DeviceQualifier& default_device) const;
|
||||||
void UpdateInput();
|
void UpdateInput();
|
||||||
void UpdateOutput();
|
|
||||||
|
|
||||||
std::recursive_mutex update_lock;
|
std::recursive_mutex update_lock;
|
||||||
|
|
||||||
|
@ -101,7 +101,6 @@ public:
|
|||||||
virtual int GetId() const = 0;
|
virtual int GetId() const = 0;
|
||||||
virtual std::string GetSource() const = 0;
|
virtual std::string GetSource() const = 0;
|
||||||
virtual void UpdateInput() {}
|
virtual void UpdateInput() {}
|
||||||
virtual void UpdateOutput() {}
|
|
||||||
|
|
||||||
const std::vector<Input*>& Inputs() const { return m_inputs; }
|
const std::vector<Input*>& Inputs() const { return m_inputs; }
|
||||||
const std::vector<Output*>& Outputs() const { return m_outputs; }
|
const std::vector<Output*>& Outputs() const { return m_outputs; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user