v0.11.0.9

This commit is contained in:
Joonas Rikkonen
2020-12-09 16:34:16 +02:00
parent bbf06f0984
commit f433a7ba10
325 changed files with 13947 additions and 3652 deletions
@@ -19,6 +19,8 @@ namespace Barotrauma
private set;
}
private static volatile bool cancelAll = false;
public static void Init(GraphicsDevice graphicsDevice, bool needsBmp = false)
{
_graphicsDevice = graphicsDevice;
@@ -36,6 +38,11 @@ namespace Barotrauma
});
}
public static void CancelAll()
{
cancelAll = true;
}
private static byte[] CompressDxt5(byte[] data, int width, int height)
{
using (System.IO.MemoryStream mstream = new System.IO.MemoryStream())
@@ -220,6 +227,7 @@ namespace Barotrauma
Texture2D tex = null;
CrossThread.RequestExecutionOnMainThread(() =>
{
if (cancelAll) { return; }
tex = new Texture2D(_graphicsDevice, width, height, mipmap, format);
tex.SetData(textureData);
});