From 20642715b0cb09503a6ccb864ddb97b00628ca86 Mon Sep 17 00:00:00 2001 From: mogguh Date: Sun, 11 Nov 2007 22:42:20 +0000 Subject: Thanks to Linnex all the Wine bugs should be gone now, I can't test that myself so give some comments please. Added his suggestions into the source which fix the "on startup" bug (sdl_listmodes), "font problem" (pf24bit), "sql db new score" (exceptions are caught).. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1@602 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UTexture.pas | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Game/Code/Classes/UTexture.pas') diff --git a/Game/Code/Classes/UTexture.pas b/Game/Code/Classes/UTexture.pas index 275f0748..c832f5c1 100644 --- a/Game/Code/Classes/UTexture.pas +++ b/Game/Code/Classes/UTexture.pas @@ -189,6 +189,12 @@ end; function TTextureUnit.LoadTexture(FromRegistry: boolean; Nazwa, Format, Typ: PChar; Col: LongWord): TTexture; var + +// a patch from Linnex, that solves the font problem in wine which causes chrashes + ChangeFormatBMP: TBitmap; +// end of patch (11.11.07) + + Res: TResourceStream; TextureB: TBitmap; TextureJ: TJPEGImage; @@ -449,7 +455,18 @@ begin end; if Typ = 'Font' then begin - TextureB.PixelFormat := pf24bit; + +// a patch from Linnex, that solves the font problem in wine which causes chrashes + //TextureB.PixelFormat := pf24bit; + ChangeFormatBMP := TBitmap.Create(); + ChangeFormatBMP.Assign(TextureB); + TextureB.PixelFormat := pf24bit; + TextureB.Width := ChangeFormatBMP.Width; + TextureB.Height := ChangeFormatBMP.Height; + TextureB.Canvas.Draw(0, 0, ChangeFormatBMP); + ChangeFormatBMP.Free; +// end of patch (11.11.07) + for Pet := 0 to TextureB.Height-1 do begin PPix := TextureB.ScanLine[Pet]; for Pet2 := 0 to TextureB.Width-1 do begin -- cgit v1.2.3