Make sure to do UI manipulation in the main thread

This commit is contained in:
Thog 2019-11-22 23:03:15 +01:00 committed by unknown
parent 3f4ac1cc5d
commit 7fcf4db6ae
No known key found for this signature in database
GPG key ID: 91798184109676AD

View file

@ -484,9 +484,12 @@ namespace Ryujinx.UI
//Events
private void Application_Added(object sender, ApplicationAddedEventArgs e)
{
_tableStore.AppendValues(e.AppData.Favorite, new Gdk.Pixbuf(e.AppData.Icon, 75, 75), $"{e.AppData.TitleName}\n{e.AppData.TitleId.ToUpper()}", e.AppData.Developer, e.AppData.Version, e.AppData.TimePlayed, e.AppData.LastPlayed, e.AppData.FileExtension, e.AppData.FileSize, e.AppData.Path);
_progressLabel.Text = $"{e.NumAppsLoaded}/{e.NumAppsFound} Games Loaded";
_progressBar.Value = (float)e.NumAppsLoaded / e.NumAppsFound;
Application.Invoke(delegate {
_tableStore.AppendValues(e.AppData.Favorite, new Gdk.Pixbuf(e.AppData.Icon, 75, 75), $"{e.AppData.TitleName}\n{e.AppData.TitleId.ToUpper()}", e.AppData.Developer, e.AppData.Version, e.AppData.TimePlayed, e.AppData.LastPlayed, e.AppData.FileExtension, e.AppData.FileSize, e.AppData.Path);
_progressLabel.Text = $"{e.NumAppsLoaded}/{e.NumAppsFound} Games Loaded";
_progressBar.Value = (float)e.NumAppsLoaded / e.NumAppsFound;
});
}
private void FavToggle_Toggled(object sender, ToggledArgs args)