@@ -44,6 +44,7 @@ namespace ams::mitm {
4444 },
4545 .misc = {
4646 .disable_sony_leds = false ,
47+ .dualshock_pollingrate_divisor = 8 ,
4748 .swap_dpad_lstick = false ,
4849 .invert_lstick_xaxis = false ,
4950 .invert_lstick_yaxis = false ,
@@ -86,6 +87,18 @@ namespace ams::mitm {
8687 *out = temp;
8788 }
8889
90+ void ParseInt (const char *value, int32_t *out) {
91+ *out = atoi (value);
92+ }
93+
94+ void ParsePollingRate (const char *value, int32_t *out){
95+ int32_t temp=8 ;
96+ ParseInt (value, &temp);
97+ if (temp >= 0 && temp <= 16 )
98+ *out = temp;
99+ else *out = 8 ;
100+ }
101+
89102 void ParseDeadzone (const char *value, float *out){
90103 float temp=0 .0f ;
91104 ParseFloat (value, &temp);
@@ -219,6 +232,8 @@ namespace ams::mitm {
219232 else if (strcasecmp (section, " misc" ) == 0 ) {
220233 if (strcasecmp (name, " disable_sony_leds" ) == 0 )
221234 ParseBoolean (value, &config->misc .disable_sony_leds );
235+ else if (strcasecmp (name, " dualshock_pollingrate_divisor" ) == 0 )
236+ ParsePollingRate (value, &config->misc .dualshock_pollingrate_divisor );
222237 else if (strcasecmp (name, " swap_dpad_lstick" ) == 0 )
223238 ParseBoolean (value, &config->misc .swap_dpad_lstick );
224239 else if (strcasecmp (name, " invert_lstick_xaxis" ) == 0 )
0 commit comments