beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
178 stars 95 forks source link

It seems to be impossible to write reasonable code to switch between window modes #1500

Open GoogleFrog opened 2 months ago

GoogleFrog commented 2 months ago

Here is a demonstration: https://github.com/ZeroK-RTS/WindowFrustration

Run it in a bare spring directory with whatever map you like.

Press ZXC to switch between "borderless", "windowed", and "fullscreen".

Press (XZ)^nX and you'll find that the "windowed" mode has no border.

Sometimes going C -> X results in no border too, sometimes it does not. Whether it does or not seems to depend on whether spring spends a second blanking the screen and flickering between modes.

lhog commented 2 months ago

I don't have my regular dev setup with me these days (and won't have for 1-2 months), but thanks for putting this together. If your code is not bugged and it indeed misbehaves I will sort it out.

lhog commented 2 months ago

Also can this be explained to me in human readable terms: (ZX)^nX

sprunk commented 2 months ago

Also can this be explained to me in human readable terms: (XZ)^nX

Press one of the following combinations:

GoogleFrog commented 2 months ago

Oops, I will edit the X into the right order.