mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Check that app can be exited before switching to DFU
This fixes the following crash: create a script which contains only "input()". Execute it, then while in the input, plug in the calculator. When un-plugging it, the device crashes.
This commit is contained in:
committed by
EmilieNumworks
parent
1782326ed8
commit
58f94f5e5f
@@ -37,6 +37,13 @@ public:
|
||||
ScriptStore m_scriptStore;
|
||||
};
|
||||
~App();
|
||||
bool prepareForExit() override {
|
||||
if (m_consoleController.inputRunLoopActive()) {
|
||||
m_consoleController.terminateInputLoop();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
StackViewController * stackViewController() { return &m_codeStackViewController; }
|
||||
ConsoleController * consoleController() { return &m_consoleController; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user