mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -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 ) {
|
||||
Bitmap bmp = Platform.ReadBmp( stream );
|
||||
if( !FastBitmap.CheckFormat( bmp.PixelFormat ) )
|
||||
game.Drawer2D.ConvertTo32Bpp( ref bmp );
|
||||
game.Drawer2D.SetFontBitmap( bmp );
|
||||
game.Events.RaiseChatFontChanged();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user