Skip to content

Commit 934fc87

Browse files
committed
Fixes from comment suggestions
1 parent 92ab4ec commit 934fc87

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

mc_mitm/config.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
[general]
2+
; Completely disable the use of any controller profiles present on the SD card and fall back to program defaults
3+
;disable_custom_profiles=false
4+
15
[bluetooth]
26
; Override host name of Bluetooth adapter
37
;host_name=Nintendo Switch!
48
; Override host mac address of Bluetooth adapter
59
;host_address=04:20:69:04:20:69
6-
7-
[general]
8-
; Completely disable the use of any controller profiles present on the SD card and fall back to program defaults
9-
;disable_custom_profiles=false

mc_mitm/source/controllers/emulated_switch_controller.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ namespace ams::controller {
9292

9393
m_enable_rumble = config.general.enable_rumble;
9494

95-
m_colours.body = config.colours.body;
96-
m_colours.buttons = config.colours.buttons;
97-
m_colours.left_grip = config.colours.left_grip;
95+
m_colours.body = config.colours.body;
96+
m_colours.buttons = config.colours.buttons;
97+
m_colours.left_grip = config.colours.left_grip;
9898
m_colours.right_grip = config.colours.right_grip;
9999

100100
m_swap_dpad_lstick = config.misc.swap_dpad_lstick;

mc_mitm/source/mcmitm_config.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,16 @@ namespace ams::mitm {
180180
int MissionControlConfigIniHandler(void *user, const char *section, const char *name, const char *value) {
181181
auto config = reinterpret_cast<MissionControlConfig *>(user);
182182

183-
if (strcasecmp(section, "bluetooth") == 0) {
183+
if (strcasecmp(section, "general") == 0) {
184+
if (strcasecmp(name, "disable_custom_profiles") == 0)
185+
ParseBoolean(value, &config->general.disable_custom_profiles);
186+
}
187+
else if (strcasecmp(section, "bluetooth") == 0) {
184188
if (strcasecmp(name, "host_name") == 0)
185189
std::strncpy(config->bluetooth.host_name, value, sizeof(config->bluetooth.host_name));
186190
else if (strcasecmp(name, "host_address") == 0)
187191
ParseBluetoothAddress(value, &config->bluetooth.host_address);
188192
}
189-
else if (strcasecmp(section, "general") == 0) {
190-
if (strcasecmp(name, "disable_custom_profiles") == 0)
191-
ParseBoolean(value, &config->general.disable_custom_profiles);
192-
}
193193
else {
194194
return 0;
195195
}

0 commit comments

Comments
 (0)