Merge branch 'main' of https://github.com/TwilitRealm/dusklight into randomizer

This commit is contained in:
gymnast86
2026-06-15 06:04:32 -04:00
12 changed files with 133 additions and 91 deletions
+19 -2
View File
@@ -265,6 +265,13 @@ void main01(void) {
dusk::ui::handle_event(event->sdl);
dusk::g_imguiConsole.HandleSDLEvent(event->sdl);
break;
case AURORA_WINDOW_RESIZED:
if (dusk::getSettings().video.rememberWindowSize && !dusk::getSettings().video.enableFullscreen) {
dusk::getSettings().video.lastWindowWidth.setValue(event->windowSize.width);
dusk::getSettings().video.lastWindowHeight.setValue(event->windowSize.height);
dusk::config::Save();
}
break;
case AURORA_DISPLAY_SCALE_CHANGED:
dusk::ImGuiEngine_Initialize(event->windowSize.scale);
break;
@@ -601,8 +608,18 @@ int game_main(int argc, char* argv[]) {
config.startFullscreen = dusk::getSettings().video.enableFullscreen;
config.windowPosX = -1;
config.windowPosY = -1;
config.windowWidth = defaultWindowWidth * 2;
config.windowHeight = defaultWindowHeight * 2;
const int lastWindowWidth = dusk::getSettings().video.lastWindowWidth.getValue();
const int lastWindowHeight = dusk::getSettings().video.lastWindowHeight.getValue();
if (dusk::getSettings().video.rememberWindowSize && lastWindowWidth > 0 && lastWindowHeight > 0) {
config.windowWidth = lastWindowWidth;
config.windowHeight = lastWindowHeight;
} else {
config.windowWidth = defaultWindowWidth * 2;
config.windowHeight = defaultWindowHeight * 2;
}
config.desiredBackend = ResolveDesiredBackend(parsed_arg_options);
config.logCallback = &aurora_log_callback;
config.logLevel = startupLogLevel;