Skip to content

Commit a2d5bc2

Browse files
committed
Zero should loop forever.
1 parent e94de70 commit a2d5bc2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_TurboMacro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TurboMacro_Descriptor::TurboMacro_Descriptor()
2828

2929
TurboMacro::TurboMacro()
3030
: LOOP(
31-
"<b>Number of times to loop:</b>",
31+
"<b>Number of times to loop:</b><br>(Set to zero to loop forever.)",
3232
LockMode::UNLOCK_WHILE_RUNNING,
3333
100, 0
3434
)
@@ -51,7 +51,7 @@ void TurboMacro::program(SingleSwitchProgramEnvironment& env, CancellableScope&
5151
// Connect the controller.
5252
//pbf_press_button(context, BUTTON_LCLICK, 40ms, 40ms);
5353

54-
for (uint32_t c = 0; c < LOOP; c++){
54+
for (uint32_t c = 0; c < LOOP || LOOP == 0; c++){
5555
TABLE.run(scope, env.console.controller());
5656
}
5757
}

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_TurboMacro.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ std::unique_ptr<StatsTracker> LZA_TurboMacro_Descriptor::make_stats() const{
5959

6060
LZA_TurboMacro::LZA_TurboMacro()
6161
: LOOP(
62-
"<b>Number of times to loop:</b>",
62+
"<b>Number of times to loop:</b><br>(Set to zero to loop forever.)",
6363
LockMode::UNLOCK_WHILE_RUNNING,
6464
100, 0
6565
)
@@ -120,7 +120,7 @@ void LZA_TurboMacro::program(SingleSwitchProgramEnvironment& env, CancellableSco
120120
void LZA_TurboMacro::run_table(SingleSwitchProgramEnvironment& env, CancellableScope& scope){
121121
LZA_TurboMacro_Descriptor::Stats& stats =
122122
env.current_stats<LZA_TurboMacro_Descriptor::Stats>();
123-
for (uint32_t c = 0; c < LOOP; c++){
123+
for (uint32_t c = 0; c < LOOP || LOOP == 0; c++){
124124
TABLE.run(scope, env.console.controller());
125125
stats.loops++;
126126
env.update_stats();

0 commit comments

Comments
 (0)