From 1bc46ef35b818e0ea311a7dbc43aa8a4f9efa358 Mon Sep 17 00:00:00 2001 From: ndeadly <24677491+ndeadly@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:56:32 +0100 Subject: [PATCH] mc.mitm: rename enable_dualsense_player_leds -> dualsense_enable_player_leds to be consistent with other settings names --- mc_mitm/config.ini | 2 +- mc_mitm/source/controllers/dualsense_controller.cpp | 2 +- mc_mitm/source/mcmitm_config.cpp | 6 +++--- mc_mitm/source/mcmitm_config.hpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mc_mitm/config.ini b/mc_mitm/config.ini index f112738..56b638b 100644 --- a/mc_mitm/config.ini +++ b/mc_mitm/config.ini @@ -16,6 +16,6 @@ ; Set LED lightbar brightness for Sony Dualsense controllers. Valid range [0-9] where 0=0% (off), 9=100% [default 5(50%)] ;dualsense_lightbar_brightness=4 ; Enable the white player indicator LEDs below the Dualsense touchpad [default true] -;enable_dualsense_player_leds=false +;dualsense_enable_player_leds=false ; Set Dualsense vibration intensity, 12.5% per increment. Valid range [1-8] where 1=12.5%, 8=100% [default 4(50%)] ;dualsense_vibration_intensity=4 diff --git a/mc_mitm/source/controllers/dualsense_controller.cpp b/mc_mitm/source/controllers/dualsense_controller.cpp index ff118b8..d020421 100644 --- a/mc_mitm/source/controllers/dualsense_controller.cpp +++ b/mc_mitm/source/controllers/dualsense_controller.cpp @@ -104,7 +104,7 @@ namespace ams::controller { u16 fw_version = *reinterpret_cast(&m_version_info.data[43]); auto config = mitm::GetGlobalConfig(); - if (!config->misc.enable_dualsense_player_leds) { + if (!config->misc.dualsense_enable_player_leds) { m_led_flags = 0x00; } else if (fw_version < 0x0282) { m_led_flags = player_led_flags[player_number]; diff --git a/mc_mitm/source/mcmitm_config.cpp b/mc_mitm/source/mcmitm_config.cpp index de644a5..ada8aae 100644 --- a/mc_mitm/source/mcmitm_config.cpp +++ b/mc_mitm/source/mcmitm_config.cpp @@ -32,7 +32,7 @@ namespace ams::mitm { .misc = { .dualshock4_lightbar_brightness = 5, .dualsense_lightbar_brightness = 5, - .enable_dualsense_player_leds = true, + .dualsense_enable_player_leds = true, .dualsense_vibration_intensity = 4 } }; @@ -94,8 +94,8 @@ namespace ams::mitm { ParseInt(value, &config->misc.dualshock4_lightbar_brightness, 0, 9); } else if (strcasecmp(name, "dualsense_lightbar_brightness") == 0) { ParseInt(value, &config->misc.dualsense_lightbar_brightness, 0, 9); - } else if (strcasecmp(name, "enable_dualsense_player_leds") == 0) { - ParseBoolean(value, &config->misc.enable_dualsense_player_leds); + } else if (strcasecmp(name, "dualsense_enable_player_leds") == 0) { + ParseBoolean(value, &config->misc.dualsense_enable_player_leds); } else if (strcasecmp(name, "dualsense_vibration_intensity") == 0) { ParseInt(value, &config->misc.dualsense_vibration_intensity, 1, 8); } diff --git a/mc_mitm/source/mcmitm_config.hpp b/mc_mitm/source/mcmitm_config.hpp index 99647b5..14a25b9 100644 --- a/mc_mitm/source/mcmitm_config.hpp +++ b/mc_mitm/source/mcmitm_config.hpp @@ -31,7 +31,7 @@ namespace ams::mitm { struct { int dualshock4_lightbar_brightness; int dualsense_lightbar_brightness; - bool enable_dualsense_player_leds; + bool dualsense_enable_player_leds; int dualsense_vibration_intensity; } misc; };