the array of supported titleIDs is now loaded from RPsupported
This commit is contained in:
parent
05862d202f
commit
e27974e8ad
3 changed files with 12 additions and 12 deletions
|
@ -5,7 +5,7 @@ using Ryujinx.Graphics.Gal.OpenGL;
|
||||||
using Ryujinx.HLE;
|
using Ryujinx.HLE;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Ryujinx
|
namespace Ryujinx
|
||||||
{
|
{
|
||||||
|
@ -35,15 +35,9 @@ namespace Ryujinx
|
||||||
|
|
||||||
void SetPresence(string FileType)
|
void SetPresence(string FileType)
|
||||||
{
|
{
|
||||||
ArrayList RPsupported = new ArrayList
|
if (File.Exists("./discord-rpc.dll")||File.Exists("./discord-rpc.so"))
|
||||||
{
|
|
||||||
"01006a800016e000",
|
|
||||||
"01009aa000faa000",
|
|
||||||
"0100a5c00d162000"
|
|
||||||
}; //temporary array until i make an external one to be read in
|
|
||||||
|
|
||||||
if (File.Exists("./discord-rpc.dll"))
|
|
||||||
{
|
{
|
||||||
|
string[] RPsupported = File.ReadAllLines("./RPsupported");
|
||||||
if (RPsupported.Contains(device.System.TitleID))
|
if (RPsupported.Contains(device.System.TitleID))
|
||||||
{
|
{
|
||||||
Presence.largeImageKey = device.System.TitleID;
|
Presence.largeImageKey = device.System.TitleID;
|
||||||
|
@ -52,8 +46,8 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
Presence.largeImageKey = "ryujinx";
|
Presence.largeImageKey = "ryujinx";
|
||||||
}
|
}
|
||||||
Presence.details = $"Playing {device.System.TitleName} ({device.System.TitleID})";
|
Presence.details = $"Playing {device.System.TitleName}";
|
||||||
Presence.state = "[state]";
|
Presence.state = device.System.TitleID.ToUpper();
|
||||||
Presence.largeImageText = device.System.TitleName;
|
Presence.largeImageText = device.System.TitleName;
|
||||||
Presence.startTimestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
|
Presence.startTimestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
|
||||||
Presence.smallImageKey = FileType;
|
Presence.smallImageKey = FileType;
|
||||||
|
@ -62,7 +56,7 @@ namespace Ryujinx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File.Exists("./discord-rpc.dll"))
|
if (File.Exists("./discord-rpc.dll") || File.Exists("./discord-rpc.so"))
|
||||||
{
|
{
|
||||||
Handlers = new DiscordRpc.EventHandlers();
|
Handlers = new DiscordRpc.EventHandlers();
|
||||||
Presence = new DiscordRpc.RichPresence();
|
Presence = new DiscordRpc.RichPresence();
|
||||||
|
|
3
Ryujinx/RPsupported
Normal file
3
Ryujinx/RPsupported
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
01006a800016e000
|
||||||
|
01009aa000faa000
|
||||||
|
0100a5c00d162000
|
|
@ -23,6 +23,9 @@
|
||||||
<None Update="Config.jsonc">
|
<None Update="Config.jsonc">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
<None Update="RPsupported">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue