#14102 closed defect (wontfix)

GRAPHICS: Scummvm Window not scaled

Reported by: legluondunet Owned by: lephilousophe
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game:

Description (last modified by legluondunet)

Hello, it's a global graphic bug, scummVM in window mode sometimes does not fit his full window, the game or the gui use only 1/6 of his window.
Better htan words, I joined you screenshots.

Attachments (6)

Capture d’écran_2023-02-04_14-05-31.png (131.2 KB ) - added by legluondunet 15 months ago.
Capture d’écran_2023-02-04_10-11-09.png (263.6 KB ) - added by legluondunet 15 months ago.
Capture d’écran_2023-02-04_09-58-54.png (206.3 KB ) - added by legluondunet 15 months ago.
scummvm_sdl_surface.log (5.1 KB ) - added by legluondunet 15 months ago.
log bug 14102 17 february 2023.log (6.1 KB ) - added by legluondunet 15 months ago.
Capture d’écran_2023-02-17_15-47-18.png (146.8 KB ) - added by legluondunet 15 months ago.

Download all attachments as: .zip

Change History (24)

comment:1 by legluondunet, 15 months ago

My config:
OS: Manjaro 22.0.2 Sikaris
Kernel: x86_64 Linux 6.1.9-1-MANJARO
CPU: AMD Ryzen 9 5900HX with Radeon Graphics @ 16x 3.3GHz
GPU: AMD Radeon RX 6600M (navi23, LLVM 15.0.7, DRM 3.49, 6.1.9-1-MANJARO)
Video drivers: Mesa 22.3.4

comment:2 by legluondunet, 15 months ago

scummvm git version form today 04/03/2023

comment:3 by legluondunet, 15 months ago

Description: modified (diff)
Summary: Opengl bugScummvm WIndow not scaled

comment:4 by legluondunet, 15 months ago

Description: modified (diff)

comment:5 by dwatteau, 15 months ago

Component: --Unset--Graphics
Summary: Scummvm WIndow not scaledGRAPHICS: Scummvm Window not scaled

comment:6 by lephilousophe, 15 months ago

This looks like a duplicate to #14105.
It's the same setup, this bug is intermittent and both bugs seem to relate to an invalid rect.
I propose to merge this bug in the other as a crash is more critical.

comment:7 by legluondunet, 15 months ago

FYI I already reported a very similar bug many years ago:
https://bugs.scummvm.org/ticket/10048

comment:8 by lephilousophe, 15 months ago

Finally, I am not sure the bugs are the same.
Could you provide a log from scummvm -d6 when this bug happens?

comment:9 by legluondunet, 15 months ago

I joined you a new log, I can reproduce this bug all the time. When it happened, I press alt+enter then scummvm displaying his interface in full window again.

Last edited 15 months ago by legluondunet (previous) (diff)

by legluondunet, 15 months ago

Attachment: scummvm_sdl_surface.log added

comment:10 by legluondunet, 15 months ago

Hello, I reported 3 display issues with ScummVM, this one is the latest opened and it is still active.
I compiled ScummVM from git today and I can still reproduce this issue.
I joined yo screenshot and a new log.

by legluondunet, 15 months ago

comment:11 by antoniou79, 15 months ago

Hello, do you have a desktop recording program that could record a quick video to show exactly how this happens for you?

You can upload the video to Youtube then and write the link here.

comment:12 by legluondunet, 15 months ago

as you asked:
https://youtu.be/O9KMZnFAIGE

Until now, I can reproduce this bug only in sdl_surface mode.
As you can see, the game or scummvm interface does not fully fill scummvm window.
my workaround: alt+enter to enter fullscreen.

comment:13 by antoniou79, 15 months ago

Interesting, testing on Windows 10 with ScummVM 2.8git and SurfaceSDL also has somewhat similar behavior although not as "glitchy".

The launcher window gets resized upon loading the game and also again when returning to launcher but it does not maintain the dimensions of the original launcher window. This is especially obvious if the launcher windows "maximized", but not fullscreen. And the same goes for the game window.

Windows behaves as if the ScummVM window is "maximized" though, since it offers the "restore down" icon on top right and not the "maximize icon". Clicking on "restore down" sort of centers the window but maintains dimensions. Clicking on "maximize" from this state, resize the window to maximum dimensions within the screen and fills it as expected.

Still no black areas though. Your Linux SDL seems to behave differently in that regard. I'll have to test on mine.

For now I'm thinking this is sort of known SDL graphics issue, that is especially "buggy" on Linux.

comment:14 by antoniou79, 15 months ago

I have tested on Ubuntu 20.04 and 22.04 and I can reproduce this, pretty much as shown in the video (thanks for uploading that by the way!).

Steps:

  • Launch ScummVM in windowed mode. (tested with ScummVM 2.8git, built from master HEAD)
  • From Global Options set Graphics Mode to Surface SDL, if it's not set already.
  • Maximize the window (but do not enter full screen) -- use the "square" window button.
  • Launch a game like Gabriel Knight 1 or Hyperspace Delivery Boy.
  • The game will appear in a small area on the bottom left of the window, while the rest of the window will be black.

It looks like some SDL resizing bug. Google returns quite a few results, but as I am not familiar with this part of our code, I cannot tell which one, if any, would be helpful for our issue.

The quick workarounds for the bug are:

  • Switch to fullscreen mode.

or

  • "Restore" the window that has the issue with the black area, by clicking on the "double overlapping squares" button, and then "maximize" it, by clicking on the "square" button. Edit: The buttons for "restore" and "maximize" might differ depending on the X Server GUI; in the video they appear to be a single "square" at all times.
Last edited 15 months ago by antoniou79 (previous) (diff)

comment:15 by lephilousophe, 15 months ago

This is indeed a bug in SDL.
I just created a PR for a fix: https://github.com/libsdl-org/SDL/pull/7341

While looking at the bug I failed to find a simple workaround we could do in our code.
I can only advise to use OpenGL backend under X11 as it doesn't exhibit the bug (because it handles better maximized state).

comment:16 by lephilousophe, 15 months ago

The patch has landed in SDL and will be part of next SDL2 (and 3) releases.

comment:17 by legluondunet, 15 months ago

very nice lephilousophe, thanks.

comment:18 by lephilousophe, 11 months ago

Owner: set to lephilousophe
Resolution: wontfix
Status: newclosed

Fixed in SDL tree instead.

Note: See TracTickets for help on using tickets.