Initial commit
This commit is contained in:
53
src/main.cpp
Normal file
53
src/main.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
SWR INI Tool - Switchroot INI Configuration Editor
|
||||
Copyright (C) 2026 Switchroot
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
|
||||
#include <borealis.hpp>
|
||||
|
||||
#include "main_frame.h"
|
||||
#include "logo.h"
|
||||
#include "app_config.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// Init the app
|
||||
if (!brls::Application::init("SWR INI Tool"))
|
||||
{
|
||||
brls::Logger::error("Unable to init Borealis application");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Verbose logging on PC
|
||||
#ifndef __SWITCH__
|
||||
brls::Logger::setLogLevel(brls::LogLevel::DEBUG);
|
||||
#endif
|
||||
|
||||
// Load saved path configuration
|
||||
AppConfig::get().load();
|
||||
|
||||
// Load custom font for logo
|
||||
if (brls::Application::loadFont(LOGO_FONT_NAME, LOGO_FONT_PATH) < 0)
|
||||
{
|
||||
brls::Logger::error("Failed to load logo font");
|
||||
}
|
||||
|
||||
// Create and push the main frame
|
||||
MainFrame *mainFrame = new MainFrame();
|
||||
brls::Application::pushView(mainFrame);
|
||||
|
||||
// Run the app
|
||||
while (brls::Application::mainLoop())
|
||||
;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user