Hello, the attached patch stops the game "Imperium Romanum" from crashing on startup with a division by zero exception. Tested with 640x480 resolution at 8bpp (perfect) and 16bpp (wrong colors but this is probably due to other fields in the ModeInfoBlock not being correct). Licence: LGPL, X11 Changelog: Michael Stefaniuc <mstefani@xxxxxxxxxx> - set the "bytes per scan line" field when generating the mode info block. bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@xxxxxxxxxx Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: dlls/winedos/int10.c =================================================================== RCS file: /home/wine/wine/dlls/winedos/int10.c,v retrieving revision 1.32 diff -u -r1.32 int10.c --- dlls/winedos/int10.c 30 Sep 2003 00:22:12 -0000 1.32 +++ dlls/winedos/int10.c 2 Jan 2004 02:41:56 -0000 @@ -328,7 +328,8 @@ *(DWORD*)(buffer + 12) = 0; /* not supported */ /* 16 - WORD: bytes per scan line */ - *(WORD*)(buffer + 16) = 0; /* FIXME */ + /* FIXME: is this always correct? */ + *(WORD*)(buffer + 16) = ptr->Width * (ptr->Depth ? (ptr->Depth + 7) / 8 : 1); /* 18 - WORD: width in pixels (graphics) or characters (text) */ *(WORD*)(buffer + 18) = ptr->Width;
Attachment:
pgp00203.pgp
Description: PGP signature