blob: a8703ab0bd78766f274618a1e0e1ce7ca38d81de [file]
#include "32blit.hpp"
#include "engine/api_private.hpp"
using namespace blit;
void init() {
bool done = false;
// launch the first thing we find
// TODO: find launcher
api.list_installed_games([&done](const uint8_t *ptr, uint32_t block, uint32_t size){
if(!done) {
auto path = "flash:/" + std::to_string(block) + ".blit";
done = api.launch(path.c_str());
}
});
if(!done) {
// fall back to launcher in storage
// TODO: auto-update
if(file_exists("launcher.blit")) {
api.launch("launcher.blit");
}
}
}
void render(uint32_t time) {
}
void update(uint32_t time) {
}