mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix client crashing when font texture isn't 32bpp, closes #168. (Thanks AndrewPH)
This commit is contained in:
parent
93c35029a3
commit
0e6f529303
@ -97,6 +97,8 @@ namespace ClassicalSharp.TexturePack {
|
|||||||
|
|
||||||
void SetFontBitmap( Game game, Stream stream ) {
|
void SetFontBitmap( Game game, Stream stream ) {
|
||||||
Bitmap bmp = Platform.ReadBmp( stream );
|
Bitmap bmp = Platform.ReadBmp( stream );
|
||||||
|
if( !FastBitmap.CheckFormat( bmp.PixelFormat ) )
|
||||||
|
game.Drawer2D.ConvertTo32Bpp( ref bmp );
|
||||||
game.Drawer2D.SetFontBitmap( bmp );
|
game.Drawer2D.SetFontBitmap( bmp );
|
||||||
game.Events.RaiseChatFontChanged();
|
game.Events.RaiseChatFontChanged();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user