Convert to 32bbp internally in FastCopyIntoSprite.

This avoids the need for callers to ensure the pixel format is correct, but ensures that the copying succeeds when the format is different.
This commit is contained in:
RoosterDragon
2015-04-17 18:44:17 +01:00
parent f77d6f6044
commit 9c93001c84
3 changed files with 24 additions and 26 deletions

View File

@@ -156,12 +156,6 @@ namespace OpenRA
SpawnPoints = spawns;
CustomPreview = new Bitmap(new MemoryStream(Convert.FromBase64String(r.minimap)));
if (CustomPreview.PixelFormat != PixelFormat.Format32bppArgb)
{
var original = CustomPreview;
CustomPreview = original.CloneWith32bbpArgbPixelFormat();
original.Dispose();
}
}
catch (Exception) { }