input_common: cache vibration tests
This commit is contained in:
parent
6b71530fa8
commit
7f66050f0c
10 changed files with 93 additions and 57 deletions
|
@ -324,7 +324,7 @@ bool GCAdapter::GetGCEndpoint(libusb_device* device) {
|
|||
return true;
|
||||
}
|
||||
|
||||
Common::Input::VibrationError GCAdapter::SetRumble(
|
||||
Common::Input::VibrationError GCAdapter::SetVibration(
|
||||
const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) {
|
||||
const auto mean_amplitude = (vibration.low_amplitude + vibration.high_amplitude) * 0.5f;
|
||||
const auto processed_amplitude =
|
||||
|
@ -338,6 +338,10 @@ Common::Input::VibrationError GCAdapter::SetRumble(
|
|||
return Common::Input::VibrationError::None;
|
||||
}
|
||||
|
||||
bool GCAdapter::IsVibrationEnabled([[maybe_unused]] const PadIdentifier& identifier) {
|
||||
return rumble_enabled;
|
||||
}
|
||||
|
||||
void GCAdapter::UpdateVibrations() {
|
||||
// Use 8 states to keep the switching between on/off fast enough for
|
||||
// a human to feel different vibration strenght
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue