Menu

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

*None
closed-fixed
None
5
2016-02-17
2016-02-14
No

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).

Discussion

  • Joost Peters

    Joost Peters - 2016-02-14
    • assigned_to: Joost Peters --> nobody
     
  • Joost Peters

    Joost Peters - 2016-02-15

    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.
    
     
  • Johannes Schickel

    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.

     
  • Joost Peters

    Joost Peters - 2016-02-16

    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)?

     
  • Johannes Schickel

    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.

     
  • Johannes Schickel

    • status: open --> closed-fixed
    • assigned_to: Johannes Schickel
     
  • Johannes Schickel

    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.

     
MongoDB Logo MongoDB