Skip to content

Commit 01cd9aa

Browse files
committed
Mitigation: Date-spam misses date and lands in language change. Don't reboot the Switch.
1 parent 35f993f commit 01cd9aa

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

SerialPrograms/Source/PokemonSwSh/Commands/PokemonSwSh_Commands_DateSpam.cpp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ void roll_date_forward_1(ProControllerContext& context, bool fast){
107107
Milliseconds unit = 34ms + tv;
108108

109109
ssf_press_button(context, BUTTON_A, 160ms, 3*unit);
110-
ssf_issue_scroll(context, SSF_SCROLL_UP, 0ms, 2*unit, unit);
110+
ssf_issue_scroll(context, SSF_SCROLL_UP, unit);
111+
112+
// Left scroll in case we missed the date menu and landed in the
113+
// language change.
114+
ssf_issue_scroll(context, SSF_SCROLL_LEFT, 0ms, 2*unit, unit);
115+
111116
ssf_press_button(context, BUTTON_A, unit);
112117
// ssf_issue_scroll(context, SSF_SCROLL_RIGHT, unit);
113118
ssf_issue_scroll(context, SSF_SCROLL_RIGHT, unit);
@@ -123,6 +128,11 @@ void roll_date_forward_1(ProControllerContext& context, bool fast){
123128
default:{
124129
ssf_press_button_ptv(context, BUTTON_A, 160ms, 80ms);
125130
ssf_issue_scroll_ptv(context, SSF_SCROLL_UP);
131+
132+
// Left scroll in case we missed the date menu and landed in the
133+
// language change.
134+
ssf_issue_scroll_ptv(context, SSF_SCROLL_LEFT);
135+
126136
ssf_press_button_ptv(context, BUTTON_A);
127137
ssf_issue_scroll_ptv(context, SSF_SCROLL_RIGHT);
128138
ssf_issue_scroll_ptv(context, SSF_SCROLL_UP);
@@ -171,9 +181,15 @@ void roll_date_backward_N(ProControllerContext& context, uint8_t skips, bool fas
171181
Milliseconds unit = 32ms + tv;
172182

173183
ssf_press_button(context, BUTTON_A, 160ms, 3*unit);
184+
174185
for (uint8_t c = 0; c < skips - 1; c++){
175186
ssf_issue_scroll(context, SSF_SCROLL_DOWN, unit);
176187
}
188+
189+
// Left scroll in case we missed the date menu and landed in the
190+
// language change.
191+
ssf_issue_scroll(context, SSF_SCROLL_LEFT, unit);
192+
177193
ssf_issue_scroll(context, SSF_SCROLL_DOWN, 0ms, 2*unit, unit);
178194
ssf_press_button(context, BUTTON_A, unit);
179195
// ssf_issue_scroll(context, SSF_SCROLL_RIGHT, unit);
@@ -198,6 +214,11 @@ void roll_date_backward_N(ProControllerContext& context, uint8_t skips, bool fas
198214
ssf_issue_scroll_ptv(context, SSF_SCROLL_DOWN);
199215
}
200216
}
217+
218+
// Left scroll in case we missed the date menu and landed in the
219+
// language change.
220+
ssf_issue_scroll_ptv(context, SSF_SCROLL_LEFT);
221+
201222
ssf_press_button_ptv(context, BUTTON_A);
202223
// ssf_issue_scroll_ptv(context, SSF_SCROLL_RIGHT);
203224
ssf_issue_scroll_ptv(context, SSF_SCROLL_RIGHT);

0 commit comments

Comments
 (0)