mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-09-02 18:32:44 -04:00
Fix navigation on deadzone option, convert backing value to int to match other sliders
This commit is contained in:
+1
-1
@@ -175,7 +175,7 @@ void set_general_settings_from_json(const nlohmann::json& config_json) {
|
||||
recomp::set_rumble_strength(from_or_default(config_json, "rumble_strength", 25));
|
||||
recomp::set_gyro_sensitivity(from_or_default(config_json, "gyro_sensitivity", 50));
|
||||
recomp::set_mouse_sensitivity(from_or_default(config_json, "mouse_sensitivity", is_steam_deck ? 50 : 0));
|
||||
recomp::set_joystick_deadzone(from_or_default(config_json, "joystick_deadzone", 0.0f));
|
||||
recomp::set_joystick_deadzone(from_or_default(config_json, "joystick_deadzone", 5));
|
||||
recomp::set_autosave_mode(from_or_default(config_json, "autosave_mode", recomp::AutosaveMode::On));
|
||||
recomp::set_debug_mode_enabled(from_or_default(config_json, "debug_mode", false));
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ struct ControlOptionsContext {
|
||||
int rumble_strength; // 0 to 100
|
||||
int gyro_sensitivity; // 0 to 100
|
||||
int mouse_sensitivity; // 0 to 100
|
||||
float joystick_deadzone;
|
||||
int joystick_deadzone; // 0 to 100
|
||||
recomp::TargetingMode targeting_mode;
|
||||
recomp::BackgroundInputMode background_input_mode;
|
||||
recomp::AutosaveMode autosave_mode;
|
||||
@@ -301,7 +301,7 @@ int recomp::get_mouse_sensitivity() {
|
||||
return control_options_context.mouse_sensitivity;
|
||||
}
|
||||
|
||||
float recomp::get_joystick_deadzone() {
|
||||
int recomp::get_joystick_deadzone() {
|
||||
return control_options_context.joystick_deadzone;
|
||||
}
|
||||
|
||||
@@ -319,9 +319,9 @@ void recomp::set_mouse_sensitivity(int sensitivity) {
|
||||
}
|
||||
}
|
||||
|
||||
void recomp::set_joystick_deadzone(float value) {
|
||||
control_options_context.joystick_deadzone = value;
|
||||
if(general_model_handle) {
|
||||
void recomp::set_joystick_deadzone(int deadzone) {
|
||||
control_options_context.joystick_deadzone = deadzone;
|
||||
if (general_model_handle) {
|
||||
general_model_handle.DirtyVariable("joystick_deadzone");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user