mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-19 15:28:34 -05:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user