Awoo-Installer/source/main.cpp

21 lines
657 B
C++
Raw Normal View History

2019-10-17 20:20:40 +00:00
#include "switch.h"
#include "ui/MainApplication.hpp"
#include "util/util.hpp"
2019-10-17 20:20:40 +00:00
using namespace pu::ui::render;
int main(int argc, char* argv[])
{
inst::util::initApp();
2019-10-17 20:20:40 +00:00
try {
auto renderer = Renderer::New(SDL_INIT_TIMER | SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER,
RendererInitOptions::RendererNoSound, RendererHardwareFlags);
auto main = inst::ui::MainApplication::New(renderer);
main->Prepare();
main->Show();
} catch (std::exception& e) {
printf("An error occurred:\n%s", e.what());
2019-10-17 20:20:40 +00:00
}
inst::util::deinitApp();
2019-10-17 20:20:40 +00:00
return 0;
}