Closed ac-arcana closed 4 months ago
I looked into this a bit and I don't think it has much todo with the save data (despite of course the cfg itself, but that's not really an issue)
I see you run this on Window mode Fullscreen. When the resolution gets changed, in order for the game window to cover the screen, the window mode needs to be reapplied. If you change the resolution first and then change the window mode (windowed and then back to fullscreen) you should be able to get back to fullscreen in the desired resolution (and not have those black areas).
I'll look into maybe triggering re-applying the window mode on resolution change to see if this fixes it as that's what I'd expect to happen too.
Yeah, seeing this now, can confirm. Whenever you close the pause menu, regardless of whether or not you made resolution changes via the options menu, it will "reapply" whatever settings are saved. This is to clear any potentially unapplied settings when the player returns.
So when you alter the window size, closing the pause menu will reconfigure your layout -- even if you just opened and closed the pause menu and that's it.
With the latest version now, when I delete my data, my settings are defaulting to fullscreen and 1280x720 resolution. This is resulting in the same black boxing behavior when the game starts.
If there's no config file, the window mode and resolution defaults to the first available setting AFAIK. What scene are you experiencing this behaviour (game scene or main menu scene?)
Currently the options in the main scene aren't applied the same way as in the pause. I'll probably tinker a bit more with it to make the behavior match more.
The game scene, basically as soon as I start the main game scene (by picking a new game)
Just a mini update: With this commit https://github.com/Phazorknight/Cogito/commit/b872a285b6336c777d3013edacafb868a6c6b6be, I've centralized how the option menu is handled via a single packaged scene that is included in both the main menu and the pause menu.
I haven't changed how the options config gets loaded/applied yet.
As this might be a bit tricky to reproduce, here's just me laying out how the options menu works in terms of saving/loading settings.
When the option menu enters the tree (which happens both immediately on the main menu scene or a game scene that contains the pause menu), loading the saved config is attempted with a deferred call. (OptionsTabMenu.gd: line 85
)
Since this is a deferred call, there might be a frame where the window mode / resolution isn't as expected.
If no config is found, most settings assume their defaults. For resolution that's 1280×720, window mode is full screen.
While changes to the settings can be made, they are not automatically saved. The config file is only saved if the “Apply changes” button is pressed. This might not produce the expected behavior, though, so I'm happy to tweak this.
This still isn't what I would think is expected behavior. Here is the latest behavior for me:
Thanks for this video, that was helpful in getting to the bottom of this.
Please give the latest commit a try: https://github.com/Phazorknight/Cogito/commit/10befee1207ecc7f134d115fdbab173c41289141
This basically forces to apply the window mode whenever the options are loaded, which should reduce the amount of times the black bars appear. Unfortunately, this also creates a bit of a window flashing whenever the window mode is applied. Will see if I can find a way to reduce this in the future.
This behaved way better now. I'd say that's resolved
On the latest version, when I delete my save data, the resolution is reset to 1280x720. The result is that once I change any setting my view changes to a small viewport as the resolution is not my screen resolution.
See the following video demonstrating the issue:
https://youtu.be/uzcj04vnZ8g