mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 09:04:23 +00:00
UI: RPC: Small change to how values are passed to hopefully detect the player pos better
This commit is contained in:
parent
158ea7b4d6
commit
a0edc5c2b0
@ -40,22 +40,13 @@ namespace Ryujinx.Ava.Utilities
|
||||
private static PlayReportFormattedValue BreathOfTheWild_MasterMode(ref PlayReportValue value)
|
||||
=> value.BoxedValue is 1 ? "Playing Master Mode" : PlayReportFormattedValue.ForceReset;
|
||||
|
||||
private static PlayReportFormattedValue TearsOfTheKingdom_CurrentField(ref PlayReportValue value)
|
||||
{
|
||||
try
|
||||
private static PlayReportFormattedValue TearsOfTheKingdom_CurrentField(ref PlayReportValue value) =>
|
||||
value.PackedValue.AsDouble() switch
|
||||
{
|
||||
return (double)value.BoxedValue switch
|
||||
{
|
||||
> 800d => "Exploring the Sky Islands",
|
||||
< -201d => "Exploring the Depths",
|
||||
_ => "Roaming Hyrule"
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
return PlayReportFormattedValue.ForceReset;
|
||||
}
|
||||
}
|
||||
> 800d => "Exploring the Sky Islands",
|
||||
< -201d => "Exploring the Depths",
|
||||
_ => "Roaming Hyrule"
|
||||
};
|
||||
|
||||
private static PlayReportFormattedValue SuperMarioOdyssey_AssistMode(ref PlayReportValue value)
|
||||
=> value.BoxedValue is 1 ? "Playing in Assist Mode" : "Playing in Regular Mode";
|
||||
@ -141,7 +132,7 @@ namespace Ryujinx.Ava.Utilities
|
||||
PlayReportValue value = new()
|
||||
{
|
||||
Application = appMeta,
|
||||
BoxedValue = valuePackObject.ToObject()
|
||||
PackedValue = valuePackObject
|
||||
};
|
||||
|
||||
return formatSpec.ValueFormatter(ref value);
|
||||
@ -180,10 +171,13 @@ namespace Ryujinx.Ava.Utilities
|
||||
}
|
||||
}
|
||||
|
||||
public struct PlayReportValue
|
||||
public readonly struct PlayReportValue
|
||||
{
|
||||
public ApplicationMetadata Application { get; init; }
|
||||
public object BoxedValue { get; init; }
|
||||
|
||||
public MessagePackObject PackedValue { get; init; }
|
||||
|
||||
public object BoxedValue => PackedValue.ToObject();
|
||||
}
|
||||
|
||||
public struct PlayReportFormattedValue
|
||||
|
Loading…
x
Reference in New Issue
Block a user