Skip to content

Commit a66ba84

Browse files
committed
Fix programs not really stopping when you stop them.
1 parent 65b3111 commit a66ba84

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_MultiSwitchProgramSession.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ void MultiSwitchProgramSession::run_program_instance(MultiSwitchProgramEnvironme
110110
env.consoles[c].controller().wait_for_all(&scope);
111111
}
112112
}catch (...){
113+
for (size_t c = 0; c < consoles; c++){
114+
env.consoles[c].controller().cancel_all_commands();
115+
}
113116
m_scope.store(nullptr, std::memory_order_release);
114117
throw;
115118
}

SerialPrograms/Source/NintendoSwitch/Framework/NintendoSwitch_SingleSwitchProgramSession.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void SingleSwitchProgramSession::run_program_instance(SingleSwitchProgramEnviron
8383
m_option.instance().program(env, scope);
8484
env.console.controller().wait_for_all(&scope);
8585
}catch (...){
86+
env.console.controller().cancel_all_commands();
8687
m_scope.store(nullptr, std::memory_order_release);
8788
throw;
8889
}

0 commit comments

Comments
 (0)