mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-19 20:37:51 +00:00
service: hid: Fully implement abstract vibration
This commit is contained in:
parent
fa21d6ee85
commit
e2313faec9
31 changed files with 905 additions and 448 deletions
|
@ -116,8 +116,8 @@ void ConfigureVibration::VibrateController(Core::HID::ControllerTriggerType type
|
|||
.high_amplitude = 1.0f,
|
||||
.high_frequency = 320.0f,
|
||||
};
|
||||
controller->SetVibration(0, vibration);
|
||||
controller->SetVibration(1, vibration);
|
||||
controller->SetVibration(Core::HID::DeviceIndex::Left, vibration);
|
||||
controller->SetVibration(Core::HID::DeviceIndex::Right, vibration);
|
||||
|
||||
// Restore previous values
|
||||
player.vibration_enabled = old_vibration_enabled;
|
||||
|
@ -127,7 +127,7 @@ void ConfigureVibration::VibrateController(Core::HID::ControllerTriggerType type
|
|||
void ConfigureVibration::StopVibrations() {
|
||||
for (std::size_t i = 0; i < NUM_PLAYERS; ++i) {
|
||||
auto controller = hid_core.GetEmulatedControllerByIndex(i);
|
||||
controller->SetVibration(0, Core::HID::DEFAULT_VIBRATION_VALUE);
|
||||
controller->SetVibration(1, Core::HID::DEFAULT_VIBRATION_VALUE);
|
||||
controller->SetVibration(Core::HID::DeviceIndex::Left, Core::HID::DEFAULT_VIBRATION_VALUE);
|
||||
controller->SetVibration(Core::HID::DeviceIndex::Right, Core::HID::DEFAULT_VIBRATION_VALUE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue