configure_input: Hook up the vibration percentage spinbox
This allows setting the vibration strength percentage anywhere from 1% to 100%. Also hooks up the remaining motion button and checkbox in the Controller Applet.
This commit is contained in:
parent
e02ef3c3be
commit
652d6766d5
11 changed files with 26 additions and 3 deletions
|
@ -703,7 +703,8 @@ void Controller_NPad::VibrateController(const std::vector<DeviceHandle>& vibrati
|
|||
|
||||
// TODO: Vibrate left/right vibration motors independently if possible.
|
||||
button_state[A - BUTTON_HID_BEGIN]->SetRumblePlay(
|
||||
vibration_values[i].amp_high, vibration_values[i].amp_low,
|
||||
vibration_values[i].amp_high * Settings::values.vibration_strength.GetValue() / 100,
|
||||
vibration_values[i].amp_low * Settings::values.vibration_strength.GetValue() / 100,
|
||||
vibration_values[i].freq_high, vibration_values[i].freq_low);
|
||||
|
||||
latest_vibration_values[npad_index][device_index] = vibration_values[i];
|
||||
|
|
|
@ -150,6 +150,7 @@ void RestoreGlobalState() {
|
|||
values.players.SetGlobal(true);
|
||||
values.use_docked_mode.SetGlobal(true);
|
||||
values.vibration_enabled.SetGlobal(true);
|
||||
values.vibration_strength.SetGlobal(true);
|
||||
values.motion_enabled.SetGlobal(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,6 +170,7 @@ struct Values {
|
|||
Setting<bool> use_docked_mode;
|
||||
|
||||
Setting<bool> vibration_enabled;
|
||||
Setting<int> vibration_strength;
|
||||
|
||||
Setting<bool> motion_enabled;
|
||||
std::string motion_device;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue