fix: alot of stuff changed. Mostly bugfixxes / architechture changes

This commit is contained in:
2026-08-09 02:24:17 +02:00
parent 4b6f773c0c
commit 05384debbf
98 changed files with 5461 additions and 1751 deletions
+13 -2
View File
@@ -1,4 +1,6 @@
#include <cstdio>
#include <stdexcept>
#include <string>
#include <SDL.h>
#include "Lightkeeper.h"
@@ -9,8 +11,13 @@ int main(int argc, char* argv[]) {
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", SDL_GetError(), nullptr);
return 1;
}
{
std::filesystem::path exeDir = SDL_GetBasePath();
try {
char* basePath = SDL_GetBasePath();
if (basePath == nullptr) {
throw std::runtime_error(std::string{"SDL_GetBasePath failed: "} + SDL_GetError());
}
const std::filesystem::path exeDir = basePath;
SDL_free(basePath);
spdlog::set_level(spdlog::level::debug);
@@ -24,6 +31,10 @@ int main(int argc, char* argv[]) {
});
app.run();
app.cleanup();
} catch (const std::exception& exception) {
spdlog::critical("Lightkeeper terminated with an error: {}", exception.what());
SDL_Quit();
return 1;
}
SDL_Quit();