Opened 9 years ago

Closed 9 years ago

Last modified 6 years ago

#7038 closed defect (fixed)

IRIX: X BadMatch when trying to start any 640x480 game

Reported by: joostp Owned by: lordhoto
Priority: normal Component: Port: IRIX
Version: Keywords:
Cc: Game:

Description

Trying to start any 640x480 game in current branch-1-8 results in:

X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 129 (MIT-SHM) Minor opcode of failed request: 3 (X_ShmPutImage) Serial number of failed request: 919 Current serial number in output stream: 920

It doesn't matter if the game is launched from the launcher or directly from the command line. I've tried COMI, The 7th Guest and ZGI, so the problem is not engine specific. These games all work fine with 1.7.0 (except for ZGI, of course, which wasn't supported).

Ticket imported from: bugs/7038.

Change History (8)

comment:1 by joostp, 9 years ago

Owner: joostp removed

comment:2 by joostp, 9 years ago

40e019efd45a02261a7dbc69ceaa9188d8c7a269 is the first bad commit commit 40e019efd45a02261a7dbc69ceaa9188d8c7a269 Author: Littleboy littleboy@scummvm.org Date: Fri May 15 23:36:40 2015 -0400

SDL: Restore the original video mode when unloading the Surface graphics manager

We set a custom video mode that might have a different BPP from the default. To ensure that other graphics managers will get the proper results when listing available video modes, we need to restore the initial BPP when unloading.

This fixes an issue when switching to OpenGL on Windows 8 and later. On those OSes, fullscreen OpenGL only has a 32bpp mode. It is correctly listed in the options but we call SLD_SetVideoMode later in the surface graphics manager. When we list the mode again after a switch, the internally selected BPP is still 16 and we fail to find any available fullscreen modes.

comment:3 by lordhoto, 9 years ago

Just an update: On Joost's hardware only 16bit modes are supported. However, SDL tells us there is a 32bit mode setup on start (lines 806-809). In unloadGfxMode (lines 953+954) we now try to setup a 32bit mode again, which causes this error.

comment:4 by joostp, 9 years ago

I'm not quite sure what the best way to fix this is. Maybe disabling this new code for IRIX specifically (or only enabling it for Windows, since this seems to address a Windows-specific bug)?

comment:5 by lordhoto, 9 years ago

I think enabling it for Win32 only for now should be fine. I hope we can switch to SDL2 for most platforms in the near future anyway. Then this code path is only relevant for legacy reasons anyway.

comment:6 by lordhoto, 9 years ago

Owner: set to lordhoto
Resolution: fixed
Status: newclosed

comment:7 by lordhoto, 9 years ago

This should be fixed in master by fd688b73d75b06f96310d0151a2c9ef13d387f74 and in branch-1-8 by 2df8d29e4aed4cf846dfbf66d5a0aa509aa58902. I simply limited the offending code path to Win32 for now, this is the only system we know of which requires it.

comment:8 by digitall, 6 years ago

Component: Port: IRIX
Note: See TracTickets for help on using tickets.