mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-24 15:43:13 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusklight into randomizer
This commit is contained in:
+19
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user