mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-29 00:59:51 -06:00
Keep the GUI alive when closing a game (#888)
* Keep the GUI alive when closing a game Make HLE.Switch init when starting a game and dispose it when closing the GlScreen. This also make HLE in charge of disposing the audio and gpu backend. * Address Ac_k's comments * Make sure to dispose the Discord module and use GTK quit method Also update Discord Precense when closing a game. * Make sure to dispose MainWindow * Address gdk's comments
This commit is contained in:
@ -88,5 +88,23 @@ namespace Ryujinx.Configuration
|
||||
|
||||
DiscordClient?.SetPresence(DiscordPresence);
|
||||
}
|
||||
|
||||
public static void SwitchToMainMenu()
|
||||
{
|
||||
DiscordPresence.Details = "Main Menu";
|
||||
DiscordPresence.State = "Idling";
|
||||
DiscordPresence.Assets.LargeImageKey = "ryujinx";
|
||||
DiscordPresence.Assets.LargeImageText = LargeDescription;
|
||||
DiscordPresence.Assets.SmallImageKey = null;
|
||||
DiscordPresence.Assets.SmallImageText = null;
|
||||
DiscordPresence.Timestamps = new Timestamps(DateTime.UtcNow);
|
||||
|
||||
DiscordClient?.SetPresence(DiscordPresence);
|
||||
}
|
||||
|
||||
public static void Exit()
|
||||
{
|
||||
DiscordClient?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user