TerminalEmbed

This commit is contained in:
2025-04-12 13:44:34 -05:00
parent 259cc9a3fa
commit 3e3b87d62e
3 changed files with 100 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
#include "TerminalEmbed.h"
void TerminalEmbed::run() {
for(auto m : runOrder)
modules[m]->onLoad();
// Main loop
while (!done && !runOrder.empty()) {
for(auto m : runOrder) {
modules[m]->run();
}
for(auto m : toClose) {
unload(m);
}
toClose.clear();
for(auto m : toOpen) {
if(std::holds_alternative<std::string>(m)) {
load(std::get<std::string>(m))->onLoad();
} else {
load(std::get<Archimedes::Module*>(m))->onLoad();
}
}
toOpen.clear();
}
}