using sdl main

This commit is contained in:
2026-04-06 15:37:56 +02:00
parent fd319405e5
commit 60f6c9281b

View File

@@ -4,7 +4,7 @@
#include "Log.h" #include "Log.h"
#include "SDL3/SDL_events.h" #include "SDL3/SDL_events.h"
#include "SDL3/SDL_hints.h" #include "SDL3/SDL_hints.h"
#include "SDL3/SDL_main.h" #include "SDL3/SDL_init.h"
#include "SDL3/SDL_render.h" #include "SDL3/SDL_render.h"
#include "SDL3/SDL_stdinc.h" #include "SDL3/SDL_stdinc.h"
#include "SDL3/SDL_timer.h" #include "SDL3/SDL_timer.h"
@@ -15,15 +15,10 @@
#include <memory> #include <memory>
#include <ranges> #include <ranges>
#define SDL_MAIN_HANDLED 1
namespace SakuraVNE { namespace SakuraVNE {
Application *Application::s_Instance = nullptr; Application *Application::s_Instance = nullptr;
Application::Application(const AppData &appdata) : m_Window(), m_Renderer(nullptr), m_Surface(nullptr), m_isRunning(false), m_AppData(appdata) { Application::Application(const AppData &appdata) : m_Window(), m_Renderer(nullptr), m_Surface(nullptr), m_isRunning(false), m_AppData(appdata) { m_initResult = Init(); }
SDL_SetMainReady();
m_initResult = Init();
}
Application::~Application() { Shutdown(); } Application::~Application() { Shutdown(); }
bool Application::Init() { bool Application::Init() {