mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-07 08:49:15 +00:00
Stickers: hacky workaround for bug in MTJobManager
This commit is contained in:
parent
d635b45db2
commit
d1102bb1e5
6 changed files with 18 additions and 6 deletions
|
@ -146,6 +146,8 @@ public static partial class ModNetwork
|
|||
{
|
||||
try
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = false; // working around bug in MTJobManager
|
||||
|
||||
var textureData = _textureStorage[stickerSlot].textureData;
|
||||
var textureHash = _textureStorage[stickerSlot].textureHash;
|
||||
var width = _textureStorage[stickerSlot].width;
|
||||
|
@ -181,6 +183,7 @@ public static partial class ModNetwork
|
|||
{
|
||||
IsSendingTexture = false;
|
||||
InvokeTextureOutboundStateChanged(false);
|
||||
Thread.CurrentThread.IsBackground = true; // working around bug in MTJobManager
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public partial class StickerSystem
|
|||
{
|
||||
try
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = false; // working around bug in MTJobManager
|
||||
if (!TryLoadImage(imageName, slotIndex, out string errorMessage))
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
|
@ -61,6 +62,7 @@ public partial class StickerSystem
|
|||
finally
|
||||
{
|
||||
_isLoadingImage[slotIndex] = false;
|
||||
Thread.CurrentThread.IsBackground = true; // working around bug in MTJobManager
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -83,6 +83,8 @@ public static class StickerCache
|
|||
{
|
||||
try
|
||||
{
|
||||
Thread.CurrentThread.IsBackground = false; // working around bug in MTJobManager
|
||||
|
||||
int generatedThumbnails = 0;
|
||||
|
||||
while (BTKUIAddon.IsPopulatingPage || _filesToGenerateThumbnails.Count > 0)
|
||||
|
@ -113,6 +115,7 @@ public static class StickerCache
|
|||
finally
|
||||
{
|
||||
IsGeneratingThumbnails = false;
|
||||
Thread.CurrentThread.IsBackground = true; // working around bug in MTJobManager
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue