Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#9971 closed defect (fixed)

SDL2: Fullscreen to RTL launcher resolution

Reported by: tsoliman Owned by: criezy
Priority: normal Component: Ports
Keywords: osx, sdl2, rtl, macos, launcher Cc:
Game:

Description

Self-compiled 50a90cd2f1
macOS 10.12.5 rMBP mid 2015
SDL2 2.0.5

  • make sure the launcher is windowed by default (fullscreen=false in the config)
  • from the launcher, launch a game that forces scaling off and results in a window that doesn't match the launcher size (more on that below)
  • alt-enter to go to fullscreen while the game is running (this is important)
  • use GMM to return to launcher
  • watch as launcher goes back to windowed mode in the wrong size - usually by keeping the game's size

How the launcher is messed up depends on the the values of gfx_mode and aspect_ratio and the difference between the game's locked resolution and the launcher's resolution.

This can be reproduced with games like sq6/torin/lsl6/comi unless aspect_ratio=true and gfx_mode=2x. This is because this combination puts the launcher into a matching resolution as those games are locked to (640x480).
Just make sure the game's locked resolution is different than the initial launcher by either aspect_ratio=false or gfx_mode=3x .. or picking a game that doesn't lock to 640x480 (hires adventures are great for this)

Change History (10)

comment:1 Changed 2 years ago by tsoliman

*redacted - don't ask*

Last edited 2 years ago by tsoliman (previous) (diff)

comment:2 Changed 2 years ago by tsoliman

*redacted*

Last edited 2 years ago by tsoliman (previous) (diff)

comment:3 Changed 2 years ago by tsoliman

*redacted*

Last edited 2 years ago by tsoliman (previous) (diff)

comment:4 Changed 2 years ago by tsoliman

*redacted*

Last edited 2 years ago by tsoliman (previous) (diff)

comment:5 Changed 2 years ago by tsoliman

This doesn't seem to happen in Linux (Tested in a linux VM)

EDIT: The linux was running SDL 2.0.2 which changes behavior. I will retest with SDL 2.0.5

Last edited 2 years ago by tsoliman (previous) (diff)

comment:6 Changed 2 years ago by criezy

Unless I missed something in your explanation, I can't reproduce it on macOS either. Here is what I did:

  • I set my launcher to windowed 3x mode with aspect ratio correction. The launcher was at resolution 720x960.
  • I started Broken Sword 2. It changed to 640x480 window.
  • I used Alt+Enter to switch to full-screen.
  • I then returned to the launcher using the GMM.

This resulted in the launcher going back to windowed mode in its previous size (720x960).

Self compiled (a279253)
macOS 10.9.5, iMac late 2013
SDL 2.0.5

comment:7 Changed 2 years ago by criezy

Forget my previous comment; I can actually reproduce it with the exact same steps above after a full recompilation using 87d32c2. And now I also reproduce it with a27925...

comment:8 Changed 2 years ago by tsoliman

I've tested this in a Linux VM with SDL 2.0.5 (Debian Stretch 64-bit) . It doesn't happen.

comment:9 Changed 23 months ago by criezy

Owner: set to criezy
Resolution: fixed
Status: newclosed

This is fixed by commit 00bbb73.

comment:10 Changed 23 months ago by bgK

I took a look at this since the current fix makes the window go back to the top left corner of the screen when exiting fullscreen on Linux/X11.

It looks like a macOS specific SDL2 bug to me. I've opened a bug report upstream:
https://bugzilla.libsdl.org/show_bug.cgi?id=3719

I'll #ifdef the call to SDL_SetWindowSize added in commit 00bbb73 so that it is for macOS only.

Note: See TracTickets for help on using tickets.