cleaning code
This commit is contained in:
1732
src/main_dist.cpp
1732
src/main_dist.cpp
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
||||
// main_new.cpp - Simplified application entry point for the refactored build
|
||||
// Sets critical SDL hints (DPI awareness, scaling) before initializing subsystems
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
#include "core/application/ApplicationManager.h"
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
// Ensure per-monitor DPI awareness so fullscreen/input mapping is correct on high-DPI displays
|
||||
SDL_SetHint("SDL_WINDOWS_DPI_AWARENESS", "permonitorv2");
|
||||
// Keep pixel art crisp when scaling logical content
|
||||
SDL_SetHint("SDL_RENDER_SCALE_QUALITY", "nearest");
|
||||
|
||||
ApplicationManager app;
|
||||
if (!app.initialize(argc, argv)) {
|
||||
std::cerr << "Failed to initialize application" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
try {
|
||||
app.run();
|
||||
// Ensure orderly teardown before C++ static destruction
|
||||
app.shutdown();
|
||||
} catch (const std::exception& ex) {
|
||||
std::cerr << "Fatal error: " << ex.what() << std::endl;
|
||||
app.shutdown();
|
||||
return 2;
|
||||
} catch (...) {
|
||||
std::cerr << "Unknown fatal error" << std::endl;
|
||||
app.shutdown();
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user