Opened 17 years ago

Closed 16 years ago

Last modified 5 years ago

#3156 closed defect (fixed)

SDL: games display only in a corner of the screen

Reported by: spookypeanut Owned by: fingolfin
Priority: normal Component: Port: Linux
Version: Keywords:
Cc: Game: Flight of the Amazon Queen

Description

When starting games from the gui, my default video settings are thus: hq3x default fullscreen off aspect on If I try to start a game which overrides these settings to something like this: hq2x default fullscreen on aspect off (Talking specifically about 320x200 games here) then scummvm still draws it on a 960x720 screen, but in the top left corner.

The problem can be solved by ctrl-alt-- followed by ctrl-alt-+, which gets everything the way it should be.

The same problem seems to exist with a default of hq2x and an override of normal, etc.

Running current svn on ubuntu linux, tested with gob2, samnmax & fotaq. It may be a machine specific thing I suppose: will test it on my work machine tomorrow.

Ticket imported from: #1705410. Ticket imported from: bugs/3156.

Attachments (1)

SDL_linux_problem.patch (441 bytes ) - added by spookypeanut 17 years ago.
patch to show where the bug seems to be coming in

Download all attachments as: .zip

Change History (10)

comment:1 by spookypeanut, 17 years ago

I should also point out that, for SCUMM games, the F5 gui menu is clearly trying to draw itself over the whole 960x720, but only the 640x400 (or whatever) is getting redrawn so only part of it appears (until you move the mouse over the rest).

by spookypeanut, 17 years ago

Attachment: SDL_linux_problem.patch added

patch to show where the bug seems to be coming in

comment:2 by spookypeanut, 17 years ago

I've isolated the bug, but I think it needs someone with more sdl experience than I to fix it. It seems like SDL_WM_ToggleFullScreen() is not working, even though it claims to be (much like the comment in graphics.cpp suggests is the case for Mac OS/X). The attached patch is NOT intended as a solution, but shows a way to get it to work. I have tried it on another Ubuntu machine and the bug is present, but on Windows it works correctly. I'm using sdl v1.2.11. File Added: SDL_linux_problem.patch

comment:3 by fingolfin, 17 years ago

Summary: GUI: games display only in a corner of the screenSDL: games display only in a corner of the screen

comment:4 by fingolfin, 17 years ago

Guess somebody should check whether this is an SDL bug, or whether we are not using some API correctly.

comment:5 by fingolfin, 16 years ago

Actually, spookypeanut, your patch is right on track, I think. As I understand it, the problem is indeed (yet another) bug in SDL_WM_ToggleFullScreen. So, we should just not use it at all, and use the code we use on Mac OS X and MAEMO: I.e. modify sdl/graphics.cpp, lines 707ff, replacing them all with a simple call to hotswapGFXMode();

I just changed this. We should get enough testing in the next couple days to ensure that it works correctly everywhere.

Question is now: Does this indeed fix the problem for you, spookypeanut?

comment:6 by fingolfin, 16 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newpending

comment:7 by SF/sf-robot, 16 years ago

This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).

comment:8 by SF/sf-robot, 16 years ago

Status: pendingclosed

comment:9 by digitall, 5 years ago

Component: --Unset--Port: Linux
Game: Flight of the Amazon Queen
Note: See TracTickets for help on using tickets.