diff --git a/mc_mitm/config.ini b/mc_mitm/config.ini index 83ff765..e751a8f 100644 --- a/mc_mitm/config.ini +++ b/mc_mitm/config.ini @@ -13,3 +13,5 @@ [misc] ; Disable the LED lightbar on Sony Dualshock 4 and Dualsense controllers [default false] ;disable_sony_leds=false +; Disable the white player indicator LEDs at the bottom of the Dualsense touchpad +;disable_dualsense_player_leds=false diff --git a/mc_mitm/source/controllers/dualsense_controller.cpp b/mc_mitm/source/controllers/dualsense_controller.cpp index 984c028..0c51ab1 100644 --- a/mc_mitm/source/controllers/dualsense_controller.cpp +++ b/mc_mitm/source/controllers/dualsense_controller.cpp @@ -78,9 +78,10 @@ namespace ams::controller { } Result DualsenseController::SetPlayerLed(uint8_t led_mask) { + auto config = mitm::GetGlobalConfig(); uint8_t player_number; R_TRY(LedsMaskToPlayerNumber(led_mask, &player_number)); - m_led_flags = player_led_flags[player_number]; + m_led_flags = config->misc.disable_dualsense_player_leds ? 0x00 : player_led_flags[player_number]; RGBColour colour = player_led_colours[player_number]; return this->SetLightbarColour(colour); } diff --git a/mc_mitm/source/mcmitm_config.cpp b/mc_mitm/source/mcmitm_config.cpp index 1c80bd0..a9f7450 100644 --- a/mc_mitm/source/mcmitm_config.cpp +++ b/mc_mitm/source/mcmitm_config.cpp @@ -30,7 +30,8 @@ namespace ams::mitm { .enable_motion = true }, .misc = { - .disable_sony_leds = false + .disable_sony_leds = false, + .disable_dualsense_player_leds = false } }; @@ -79,6 +80,8 @@ namespace ams::mitm { else if (strcasecmp(section, "misc") == 0) { if (strcasecmp(name, "disable_sony_leds") == 0) ParseBoolean(value, &config->misc.disable_sony_leds); + else if (strcasecmp(name, "disable_dualsense_player_leds") == 0) + ParseBoolean(value, &config->misc.disable_dualsense_player_leds); } else { return 0; diff --git a/mc_mitm/source/mcmitm_config.hpp b/mc_mitm/source/mcmitm_config.hpp index 5810c16..c381493 100644 --- a/mc_mitm/source/mcmitm_config.hpp +++ b/mc_mitm/source/mcmitm_config.hpp @@ -30,6 +30,7 @@ namespace ams::mitm { struct { bool disable_sony_leds; + bool disable_dualsense_player_leds; } misc; };