Add setting to memorize window size#2025
Conversation
|
A previous PR attempted such a feature but was bugged. Because our fullscreen mode is a borderless window, remembering the window size would lock Dusklight into being "stuck" fullscreened, until the button to restore the default window size was used. Can you confirm whether or not your PR overcomes this? |
|
(The other related PR #1238) |
|
Good point, I will do some more testing tomorrow with how it interacts with the Fullscreen toggle. I think it will probably end up saving the fullscreen dimensions, but that shouldn't prevent you from toggling it again; and it should be an easy fix to only save the dimensions when fullscreen is off. |
a20c551 to
4474a7d
Compare
|
@Irastris With the latest changes, the dimensions are only saved when fullscreen is off. This means your |
Irastris
left a comment
There was a problem hiding this comment.
Disabling the option does not restore the original behavior of Dusklight creating its window at 2x the native framebuffer size, instead it keeps using whatever the last saved window size was.
4474a7d to
108ad66
Compare
|
To address your feedback, I reworked how the setting works a little:
This should cover all cases, I think. |
|
Thanks! |
Until now, Dusklight would either start at a window size of twice the "default resolution" of 608x448, or start in fullscreen if it had been toggled in the last session. With this new setting, resizing the window will immediately save the new window size in settings, so that it can be restored at the next startup.
I added this mostly as a way to get familiar with the codebase, feedback is appreciated!