2019-10-17 16:20:40 -04:00
|
|
|
#include "switch.h"
|
2019-11-30 18:12:59 +01:00
|
|
|
#include "util/error.hpp"
|
2019-10-17 16:20:40 -04:00
|
|
|
#include "ui/MainApplication.hpp"
|
2019-10-29 21:58:53 -04:00
|
|
|
#include "util/util.hpp"
|
2019-10-17 16:20:40 -04:00
|
|
|
|
|
|
|
using namespace pu::ui::render;
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
2019-10-26 01:58:32 -04:00
|
|
|
inst::util::initApp();
|
2019-10-17 16:20:40 -04: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) {
|
2019-11-30 18:12:59 +01:00
|
|
|
LOG_DEBUG("An error occurred:\n%s", e.what());
|
2019-10-17 16:20:40 -04:00
|
|
|
}
|
2019-10-26 01:58:32 -04:00
|
|
|
inst::util::deinitApp();
|
2019-10-17 16:20:40 -04:00
|
|
|
return 0;
|
|
|
|
}
|