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)
|
private static PlayReportFormattedValue BreathOfTheWild_MasterMode(ref PlayReportValue value)
|
||||||
=> value.BoxedValue is 1 ? "Playing Master Mode" : PlayReportFormattedValue.ForceReset;
|
=> value.BoxedValue is 1 ? "Playing Master Mode" : PlayReportFormattedValue.ForceReset;
|
||||||
|
|
||||||
private static PlayReportFormattedValue TearsOfTheKingdom_CurrentField(ref PlayReportValue value)
|
private static PlayReportFormattedValue TearsOfTheKingdom_CurrentField(ref PlayReportValue value) =>
|
||||||
{
|
value.PackedValue.AsDouble() switch
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return (double)value.BoxedValue switch
|
> 800d => "Exploring the Sky Islands",
|
||||||
{
|
< -201d => "Exploring the Depths",
|
||||||
> 800d => "Exploring the Sky Islands",
|
_ => "Roaming Hyrule"
|
||||||
< -201d => "Exploring the Depths",
|
};
|
||||||
_ => "Roaming Hyrule"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return PlayReportFormattedValue.ForceReset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static PlayReportFormattedValue SuperMarioOdyssey_AssistMode(ref PlayReportValue value)
|
private static PlayReportFormattedValue SuperMarioOdyssey_AssistMode(ref PlayReportValue value)
|
||||||
=> value.BoxedValue is 1 ? "Playing in Assist Mode" : "Playing in Regular Mode";
|
=> value.BoxedValue is 1 ? "Playing in Assist Mode" : "Playing in Regular Mode";
|
||||||
@ -141,7 +132,7 @@ namespace Ryujinx.Ava.Utilities
|
|||||||
PlayReportValue value = new()
|
PlayReportValue value = new()
|
||||||
{
|
{
|
||||||
Application = appMeta,
|
Application = appMeta,
|
||||||
BoxedValue = valuePackObject.ToObject()
|
PackedValue = valuePackObject
|
||||||
};
|
};
|
||||||
|
|
||||||
return formatSpec.ValueFormatter(ref value);
|
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 ApplicationMetadata Application { get; init; }
|
||||||
public object BoxedValue { get; init; }
|
|
||||||
|
public MessagePackObject PackedValue { get; init; }
|
||||||
|
|
||||||
|
public object BoxedValue => PackedValue.ToObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct PlayReportFormattedValue
|
public struct PlayReportFormattedValue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user