OnlineCop / kq-fork

Fork of KQ r910. Just for fun.
GNU General Public License v2.0
15 stars 9 forks source link

Changing Windowed Mode or Stretch Display duplicates window #88

Closed OnlineCop closed 2 years ago

OnlineCop commented 2 years ago

On Windows, compiled from VS2022, the game opens by default in windowed mode.

Steps

  1. Open the Options from either the title screen or during gameplay.
  2. Toggle Windowed Mode from YES to NO and confirm the choice, or
  3. Toggle Stretch Display from YES to NO and confirm the choice.

Actual

  1. A second window opens over the first.
    1. For Windowed Mode, the second window is the same size as the first; for Stretch Display, the second window is about 1/4 the original window's size.
    2. The first window continues to display the "Switch to full screen?" or "Switch to windowed mode?" prompt.
    3. Focusing the first window and moving the cursor (up/down arrows) redraws on the second window, but the first window does not update.
    4. Clicking the window's [x] in the top-right corner does not close the window or the main application.

Expected

  1. There should not be a new window.
  2. For Windowed Mode, the application should switch to fullscreen mode.
pedro-w commented 2 years ago

I've made progress on this, it switches mode OK but in fullscreen it stretches to fit the monitor aspect ratio (and most people don't have 4:3 monitors these days!) I need to add a destination rectangle and put black bars up the two sides.

OnlineCop commented 2 years ago

I'm in favor of dropping support for the unscaled view entirely.

image

This isn't a preview image. This is the 1:1 windowed un-stretched display. It's tiny.

If you think people will want it, we can certainly support it.

As for fullscreen mode: I don't know that I've ever played the game fullscreen. I mean, back in the MSDOS days, sure. So again, if people would actually use or request this, I won't vote to remove it, but I personally don't use it.

pedro-w commented 2 years ago

I can make it so the Window can be resized to anything just by dragging the corners as normal - or maybe it should snap to 1x 2x 3x etc? The size would get saved in config then it would restart at the same size next time. I would like to keep fullscreen mode, also straightforward as it's a flag to SDL_CreateWindow (or can be set afterwards). SDL does support platforms without a window system (pretty sure, can't think of any just now) so we should handle that case.

OnlineCop commented 2 years ago

I'm fine leaving fullscreen mode.

In writing this response, I've edited it about a dozen times, trying to decide whether I like free-scale resizing or hate it. People with massive monitors may find that free-form scaling makes it look better. I personally like the 1:1 proportions maintained to keep the old-school feel.

But then again, if we update the graphics to anything besides 16x16 tiles, free scaling might turn out to be better.

I think I'd go with your first idea: free-form window sizing, where we'd just add bars around the top/bottom or left/right edges like modern Zoom/MS Teams/Discord collab tools would do.