yairm210 / Unciv

Open-source Android/Desktop remake of Civ V

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Window mode issues

trudnorx opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Game Version

4.11.4

Describe the bug

  1. Borderless mode fails to fully fill up screen. Window is very big but not 100%.
  2. Bordered mode doesn't store maximized status, it's lost after quit.
  3. Bordered mode seems to imprecisely store the window size (at least when using a very large window) and ignores position.

Steps to Reproduce

Screenshots

No response

Link to save file

No response

Operating System

Windows

Additional Information

No response

Add: Multimonitor - Window doesn't save which Monitor it was on.

I had a working solution once, but it relied on ugly hacks under the hood as the used libraries already bungle what an app that wishes to 100% restore its state needs - down to but not limited to the GLFW layer. That's below LwJgl3, which is below Gdx. Outdated branch still around.

On second look - this is mostly already documented in source, except for point 1. OK, maybe point 3 detail "imprecise" isn't explained either in that comment - but I seem to vaguely remember we already had an issue where Windows was set to scale by 150% or worse and in that issue we learned that the underlying libraries - below Gdx - behave inconsistently when that is the case (some reported coordinates/dimensions which should be in pixels are scaled by that factor instead), which likely explains that as well. ...#9886 was it. So is your "fails to fully fill up" or "imprecise" maybe proportional to your windows scaling setting?

On third look - #1 is by design, probably. You can't drag any window big enough so that after removing borders it will still fill the screen entirely - obviously. What you get is the size of the inside of the window before switching to borderless. Just guessing without actually testing - I'm that lazy. But I bet that fits.