28 lines
501 B
C++
28 lines
501 B
C++
#include "ui/Application.h"
|
|
#include <cstdio>
|
|
|
|
#ifdef __EMSCRIPTEN__
|
|
// Keep app alive for the Emscripten main loop.
|
|
static baudmine::Application* g_app = nullptr;
|
|
#endif
|
|
|
|
int main(int argc, char** argv) {
|
|
static baudmine::Application app;
|
|
|
|
if (!app.init(argc, argv)) {
|
|
std::fprintf(stderr, "Failed to initialize application\n");
|
|
return 1;
|
|
}
|
|
|
|
#ifdef __EMSCRIPTEN__
|
|
g_app = &app;
|
|
#endif
|
|
|
|
app.run();
|
|
|
|
#ifndef __EMSCRIPTEN__
|
|
app.shutdown();
|
|
#endif
|
|
return 0;
|
|
}
|