mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-05 06:15:26 +00:00
SteamController: Avoid deadlock when changing profile
This commit is contained in:
parent
415cd477e6
commit
082dede416
2 changed files with 9 additions and 3 deletions
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue