TerminalEmbed
This commit is contained in:
31
src/example_apps/TerminalEmbed/TerminalEmbed.cpp
Normal file
31
src/example_apps/TerminalEmbed/TerminalEmbed.cpp
Normal 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user