yeah you close

This commit is contained in:
2025-04-02 14:19:34 -05:00
parent 44ef73395c
commit 494085cdc1
4 changed files with 52 additions and 33 deletions

View File

@@ -2,23 +2,23 @@
void MinimalApp::run() {
for(auto* m : modules)
m->onLoad();
for(auto m : runOrder)
modules[m]->onLoad();
// Main loop
while (!done && !modules.empty()) {
while (!done && !runOrder.empty()) {
for(auto* m : modules) {
m->run();
for(auto m : runOrder) {
modules[m]->run();
}
for(auto it = toClose.begin(); it != toClose.end(); it++) {
unload(it);
for(auto m : toClose) {
unload(m);
}
toClose.clear();
for(std::string s : toOpen) {
load(s, modules.begin());
for(std::string m : toOpen) {
load(m);
}
toOpen.clear();
}