Only update the loading screen from the main thread
Fixes the crash experienced by pchote. It's a hack but it's easy to get rid of and it will have to do for now, until the messy LoadScreen gets fixed.
This commit is contained in:
@@ -22,12 +22,8 @@ namespace OpenRA.Graphics
|
||||
Dictionary<string, CursorSequence> cursors;
|
||||
Cache<string, PaletteReference> palettes;
|
||||
|
||||
public Action OnProgress;
|
||||
|
||||
public CursorProvider(ModData modData)
|
||||
{
|
||||
OnProgress = () => { if (modData.LoadScreen != null) modData.LoadScreen.Display(); };
|
||||
|
||||
var sequenceFiles = modData.Manifest.Cursors;
|
||||
|
||||
cursors = new Dictionary<string, CursorSequence>();
|
||||
@@ -65,8 +61,6 @@ namespace OpenRA.Graphics
|
||||
|
||||
void LoadSequencesForCursor(SpriteLoader loader, string cursorSrc, MiniYaml cursor)
|
||||
{
|
||||
OnProgress();
|
||||
|
||||
foreach (var sequence in cursor.Nodes)
|
||||
cursors.Add(sequence.Key, new CursorSequence(loader, cursorSrc, cursor.Value, sequence.Value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user