Force the runtime to prioritize the main thread and keep things smooth.
This commit is contained in:
@@ -155,6 +155,9 @@ namespace OpenRA.Widgets
|
|||||||
Previews.Add(uid, bitmap);
|
Previews.Add(uid, bitmap);
|
||||||
cacheUids.Dequeue();
|
cacheUids.Dequeue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Yuck... But this helps the UI Jank when opening the map selector significantly.
|
||||||
|
Thread.Sleep(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +175,6 @@ namespace OpenRA.Widgets
|
|||||||
if (previewLoaderThread == null || !previewLoaderThread.IsAlive)
|
if (previewLoaderThread == null || !previewLoaderThread.IsAlive)
|
||||||
{
|
{
|
||||||
previewLoaderThread = new Thread(LoadAsyncInternal);
|
previewLoaderThread = new Thread(LoadAsyncInternal);
|
||||||
previewLoaderThread.Priority = ThreadPriority.Lowest;
|
|
||||||
previewLoaderThread.Start();
|
previewLoaderThread.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user