add vctest (WIP)
This commit is contained in:
+15
-1
@@ -36,6 +36,7 @@
|
||||
#include "window/Events.hpp"
|
||||
#include "window/input.hpp"
|
||||
#include "window/Window.hpp"
|
||||
#include "interfaces/Process.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
@@ -178,12 +179,25 @@ void Engine::saveScreenshot() {
|
||||
|
||||
void Engine::run() {
|
||||
if (params.headless) {
|
||||
logger.info() << "nothing to do";
|
||||
runTest();
|
||||
} else {
|
||||
mainloop();
|
||||
}
|
||||
}
|
||||
|
||||
void Engine::runTest() {
|
||||
if (params.testFile.empty()) {
|
||||
logger.info() << "nothing to do";
|
||||
return;
|
||||
}
|
||||
logger.info() << "starting test " << params.testFile;
|
||||
auto process = scripting::start_coroutine(params.testFile);
|
||||
while (process->isActive()) {
|
||||
process->update();
|
||||
}
|
||||
logger.info() << "test finished";
|
||||
}
|
||||
|
||||
void Engine::mainloop() {
|
||||
logger.info() << "starting menu screen";
|
||||
setScreen(std::make_shared<MenuScreen>(this));
|
||||
|
||||
Reference in New Issue
Block a user