mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 21:56:24 +02:00
misc: Refactor Discord integration to listen on TitleIDs.CurrentApplication changes instead of waiting to be directly told when to change states.
This commit is contained in:
parent
1dd69912b1
commit
f463ea1c5d
6 changed files with 45 additions and 9 deletions
|
@ -8,7 +8,20 @@ namespace Ryujinx.Common
|
|||
{
|
||||
public static class TitleIDs
|
||||
{
|
||||
public static Optional<string> CurrentApplication { get; set; }
|
||||
private static string _currentApplication;
|
||||
|
||||
public static Optional<string> CurrentApplication
|
||||
{
|
||||
get => _currentApplication;
|
||||
set
|
||||
{
|
||||
_currentApplication = value.OrElse(null);
|
||||
|
||||
CurrentApplicationChanged?.Invoke(_currentApplication);
|
||||
}
|
||||
}
|
||||
|
||||
public static event Action<Optional<string>> CurrentApplicationChanged;
|
||||
|
||||
public static GraphicsBackend SelectGraphicsBackend(string titleId, GraphicsBackend currentBackend)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue