diff --git a/RELEASE.md b/RELEASE.md index 1f97c1a..554fc0a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,5 +30,5 @@ - GPU detection will log errors to `Sentry.io` - Support SMU of Vangogh GPU shipped with BIOS 113 - Fix Steam Game detection when in X360 controller mode -- Force to reconnect X360 controller on Resume +- Force to reconnect X360 controller on Resume (deadlock) - Hold-press Guide button for 100ms in X360 mode diff --git a/SteamController/Context.cs b/SteamController/Context.cs index 854e1fa..ce86df3 100644 --- a/SteamController/Context.cs +++ b/SteamController/Context.cs @@ -153,7 +153,7 @@ namespace SteamController selectedProfile = i; if (!profile.IsDesktop && !userDefault) controllerProfile = i; - ProfileChanged(profile); + OnProfileChanged(profile); } return true; } @@ -205,7 +205,7 @@ namespace SteamController selectedProfile = idx; controllerProfile = idx; - ProfileChanged(profile); + OnProfileChanged(profile); return true; } } @@ -219,5 +219,11 @@ namespace SteamController if (SelectDefault is not null) SelectDefault(); } + + private void OnProfileChanged(Profiles.Profile profile) + { + System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke( + new Action(() => ProfileChanged(profile))); + } } }