Compare commits
6 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1018c9db8b | ||
|
|
01ccd18726 | ||
|
|
abfbc6f4bc | ||
|
|
6a4bc02d7a | ||
|
|
814c0526d2 | ||
|
|
a5a4ef38e6 |
@@ -702,6 +702,18 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
|||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[CommandCmif(92)]
|
||||||
|
// SetGestureOutputRanges(pid, ushort Unknown0)
|
||||||
|
public ResultCode SetGestureOutputRanges(ServiceCtx context)
|
||||||
|
{
|
||||||
|
ulong pid = context.Request.HandleDesc.PId;
|
||||||
|
ushort unknown0 = context.RequestData.ReadUInt16();
|
||||||
|
|
||||||
|
Logger.Stub?.PrintStub(LogClass.ServiceHid, new { pid, unknown0 });
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
|
|
||||||
[CommandCmif(100)]
|
[CommandCmif(100)]
|
||||||
// SetSupportedNpadStyleSet(pid, nn::applet::AppletResourceUserId, nn::hid::NpadStyleTag)
|
// SetSupportedNpadStyleSet(pid, nn::applet::AppletResourceUserId, nn::hid::NpadStyleTag)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
using DiscordRPC;
|
using DiscordRPC;
|
||||||
|
using Gommon;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
using Humanizer.Localisation;
|
using Humanizer.Localisation;
|
||||||
using Ryujinx.Ava.Utilities.AppLibrary;
|
using Ryujinx.Ava.Utilities.AppLibrary;
|
||||||
@@ -45,16 +46,7 @@ namespace Ryujinx.Ava
|
|||||||
};
|
};
|
||||||
|
|
||||||
ConfigurationState.Instance.EnableDiscordIntegration.Event += Update;
|
ConfigurationState.Instance.EnableDiscordIntegration.Event += Update;
|
||||||
TitleIDs.CurrentApplication.Event += (_, e) =>
|
TitleIDs.CurrentApplication.Event += (_, e) => Use(e.NewValue);
|
||||||
{
|
|
||||||
if (e.NewValue)
|
|
||||||
SwitchToPlayingState(
|
|
||||||
ApplicationLibrary.LoadAndSaveMetaData(e.NewValue),
|
|
||||||
Switch.Shared.Processes.ActiveApplication
|
|
||||||
);
|
|
||||||
else
|
|
||||||
SwitchToMainState();
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Update(object sender, ReactiveEventArgs<bool> evnt)
|
private static void Update(object sender, ReactiveEventArgs<bool> evnt)
|
||||||
@@ -75,11 +67,23 @@ namespace Ryujinx.Ava
|
|||||||
_discordClient = new DiscordRpcClient(ApplicationId);
|
_discordClient = new DiscordRpcClient(ApplicationId);
|
||||||
|
|
||||||
_discordClient.Initialize();
|
_discordClient.Initialize();
|
||||||
_discordClient.SetPresence(_discordPresenceMain);
|
|
||||||
|
Use(TitleIDs.CurrentApplication);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Use(Optional<string> titleId)
|
||||||
|
{
|
||||||
|
if (titleId.TryGet(out string tid))
|
||||||
|
SwitchToPlayingState(
|
||||||
|
ApplicationLibrary.LoadAndSaveMetaData(tid),
|
||||||
|
Switch.Shared.Processes.ActiveApplication
|
||||||
|
);
|
||||||
|
else
|
||||||
|
SwitchToMainState();
|
||||||
|
}
|
||||||
|
|
||||||
private static void SwitchToPlayingState(ApplicationMetadata appMeta, ProcessResult procRes)
|
private static void SwitchToPlayingState(ApplicationMetadata appMeta, ProcessResult procRes)
|
||||||
{
|
{
|
||||||
_discordClient?.SetPresence(new RichPresence
|
_discordClient?.SetPresence(new RichPresence
|
||||||
|
|||||||
Reference in New Issue
Block a user