Input/Config: Setting to disable controller vibration/rumble

This commit is contained in:
Shiralyn 2025-05-18 01:12:32 +02:00
parent c720af00bb
commit 58ee60037e
3 changed files with 6 additions and 1 deletions

View File

@ -54,6 +54,9 @@ input:
auto_bind:
type: bool
default: true
allow_vibration:
type: bool
default: true
background_input_capture: bool
keyboard_controller_scancode_map:
# Scancode reference : https://github.com/libsdl-org/SDL/blob/main/include/SDL_scancode.h

View File

@ -490,7 +490,7 @@ void xemu_input_update_sdl_controller_state(ControllerState *state)
void xemu_input_update_rumble(ControllerState *state)
{
if (!state->rumble_enabled) {
if (!state->rumble_enabled || !g_config.input.allow_vibration) {
return;
}

View File

@ -485,6 +485,8 @@ void MainMenuInputView::Draw()
SectionTitle("Options");
Toggle("Auto-bind controllers", &g_config.input.auto_bind,
"Bind newly connected controllers to any open port");
Toggle("Controller vibration", &g_config.input.allow_vibration,
"Allows the controllers to vibrate");
Toggle("Background controller input capture",
&g_config.input.background_input_capture,
"Capture even if window is unfocused (requires restart)");