Merge branch 'master' into xeyes
This commit is contained in:
commit
24e88e2485
@ -3,6 +3,8 @@ using ARMeilleure.CodeGen.Linking;
|
|||||||
using ARMeilleure.CodeGen.Unwinding;
|
using ARMeilleure.CodeGen.Unwinding;
|
||||||
using ARMeilleure.Common;
|
using ARMeilleure.Common;
|
||||||
using ARMeilleure.Memory;
|
using ARMeilleure.Memory;
|
||||||
|
using ARMeilleure.State;
|
||||||
|
using Humanizer;
|
||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
@ -31,7 +33,7 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
private const string OuterHeaderMagicString = "PTCohd\0\0";
|
private const string OuterHeaderMagicString = "PTCohd\0\0";
|
||||||
private const string InnerHeaderMagicString = "PTCihd\0\0";
|
private const string InnerHeaderMagicString = "PTCihd\0\0";
|
||||||
|
|
||||||
private const uint InternalVersion = 6998; //! To be incremented manually for each change to the ARMeilleure project.
|
private const uint InternalVersion = 7007; //! To be incremented manually for each change to the ARMeilleure project.
|
||||||
|
|
||||||
private const string ActualDir = "0";
|
private const string ActualDir = "0";
|
||||||
private const string BackupDir = "1";
|
private const string BackupDir = "1";
|
||||||
@ -184,6 +186,36 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
InitializeCarriers();
|
InitializeCarriers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool ContainsBlacklistedFunctions()
|
||||||
|
{
|
||||||
|
List<ulong> blacklist = Profiler.GetBlacklistedFunctions();
|
||||||
|
bool containsBlacklistedFunctions = false;
|
||||||
|
_infosStream.Seek(0L, SeekOrigin.Begin);
|
||||||
|
bool foundBadFunction = false;
|
||||||
|
|
||||||
|
for (int index = 0; index < GetEntriesCount(); index++)
|
||||||
|
{
|
||||||
|
InfoEntry infoEntry = DeserializeStructure<InfoEntry>(_infosStream);
|
||||||
|
foreach (ulong address in blacklist)
|
||||||
|
{
|
||||||
|
if (infoEntry.Address == address)
|
||||||
|
{
|
||||||
|
containsBlacklistedFunctions = true;
|
||||||
|
Logger.Warning?.Print(LogClass.Ptc, "PPTC cache invalidated: Found blacklisted functions in PPTC cache");
|
||||||
|
foundBadFunction = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foundBadFunction)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return containsBlacklistedFunctions;
|
||||||
|
}
|
||||||
|
|
||||||
private void PreLoad()
|
private void PreLoad()
|
||||||
{
|
{
|
||||||
string fileNameActual = $"{CachePathActual}.cache";
|
string fileNameActual = $"{CachePathActual}.cache";
|
||||||
@ -532,7 +564,7 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
|
|
||||||
public void LoadTranslations(Translator translator)
|
public void LoadTranslations(Translator translator)
|
||||||
{
|
{
|
||||||
if (AreCarriersEmpty())
|
if (AreCarriersEmpty() || ContainsBlacklistedFunctions())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -835,10 +867,18 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
while (profiledFuncsToTranslate.TryDequeue(out (ulong address, PtcProfiler.FuncProfile funcProfile) item))
|
while (profiledFuncsToTranslate.TryDequeue(out (ulong address, PtcProfiler.FuncProfile funcProfile) item))
|
||||||
{
|
{
|
||||||
ulong address = item.address;
|
ulong address = item.address;
|
||||||
|
ExecutionMode executionMode = item.funcProfile.Mode;
|
||||||
|
bool highCq = item.funcProfile.HighCq;
|
||||||
|
|
||||||
Debug.Assert(Profiler.IsAddressInStaticCodeRange(address));
|
Debug.Assert(Profiler.IsAddressInStaticCodeRange(address));
|
||||||
|
|
||||||
TranslatedFunction func = translator.Translate(address, item.funcProfile.Mode, item.funcProfile.HighCq);
|
TranslatedFunction func = translator.Translate(address, executionMode, highCq);
|
||||||
|
|
||||||
|
if (func == null)
|
||||||
|
{
|
||||||
|
Profiler.UpdateEntry(address, executionMode, true, true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool isAddressUnique = translator.Functions.TryAdd(address, func.GuestSize, func);
|
bool isAddressUnique = translator.Functions.TryAdd(address, func.GuestSize, func);
|
||||||
|
|
||||||
@ -885,7 +925,10 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
|
|
||||||
PtcStateChanged?.Invoke(PtcLoadingState.Loaded, _translateCount, _translateTotalCount);
|
PtcStateChanged?.Invoke(PtcLoadingState.Loaded, _translateCount, _translateTotalCount);
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Ptc, $"{_translateCount} of {_translateTotalCount} functions translated | Thread count: {degreeOfParallelism} in {sw.Elapsed.TotalSeconds} s");
|
Logger.Info?.Print(LogClass.Ptc,
|
||||||
|
$"{_translateCount} of {_translateTotalCount} functions translated in {sw.Elapsed.TotalSeconds} seconds " +
|
||||||
|
$"| {"function".ToQuantity(_translateTotalCount - _translateCount)} blacklisted " +
|
||||||
|
$"| Thread count: {degreeOfParallelism}");
|
||||||
|
|
||||||
Thread preSaveThread = new(PreSave)
|
Thread preSaveThread = new(PreSave)
|
||||||
{
|
{
|
||||||
|
@ -24,11 +24,12 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
{
|
{
|
||||||
private const string OuterHeaderMagicString = "Pohd\0\0\0\0";
|
private const string OuterHeaderMagicString = "Pohd\0\0\0\0";
|
||||||
|
|
||||||
private const uint InternalVersion = 5518; //! Not to be incremented manually for each change to the ARMeilleure project.
|
private const uint InternalVersion = 7007; //! Not to be incremented manually for each change to the ARMeilleure project.
|
||||||
|
|
||||||
private static readonly uint[] _migrateInternalVersions =
|
private static readonly uint[] _migrateInternalVersions =
|
||||||
[
|
[
|
||||||
1866
|
1866,
|
||||||
|
5518,
|
||||||
];
|
];
|
||||||
|
|
||||||
private const int SaveInterval = 30; // Seconds.
|
private const int SaveInterval = 30; // Seconds.
|
||||||
@ -77,20 +78,30 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
private void TimerElapsed(object _, ElapsedEventArgs __)
|
private void TimerElapsed(object _, ElapsedEventArgs __)
|
||||||
=> new Thread(PreSave) { Name = "Ptc.DiskWriter" }.Start();
|
=> new Thread(PreSave) { Name = "Ptc.DiskWriter" }.Start();
|
||||||
|
|
||||||
public void AddEntry(ulong address, ExecutionMode mode, bool highCq)
|
public void AddEntry(ulong address, ExecutionMode mode, bool highCq, bool blacklist = false)
|
||||||
{
|
{
|
||||||
if (IsAddressInStaticCodeRange(address))
|
if (IsAddressInStaticCodeRange(address))
|
||||||
{
|
{
|
||||||
Debug.Assert(!highCq);
|
Debug.Assert(!highCq);
|
||||||
|
|
||||||
|
if (blacklist)
|
||||||
|
{
|
||||||
lock (_lock)
|
lock (_lock)
|
||||||
{
|
{
|
||||||
ProfiledFuncs.TryAdd(address, new FuncProfile(mode, highCq: false));
|
ProfiledFuncs[address] = new FuncProfile(mode, highCq: false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lock (_lock)
|
||||||
|
{
|
||||||
|
ProfiledFuncs.TryAdd(address, new FuncProfile(mode, highCq: false, false));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateEntry(ulong address, ExecutionMode mode, bool highCq)
|
public void UpdateEntry(ulong address, ExecutionMode mode, bool highCq, bool? blacklist = null)
|
||||||
{
|
{
|
||||||
if (IsAddressInStaticCodeRange(address))
|
if (IsAddressInStaticCodeRange(address))
|
||||||
{
|
{
|
||||||
@ -100,7 +111,7 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
{
|
{
|
||||||
Debug.Assert(ProfiledFuncs.ContainsKey(address));
|
Debug.Assert(ProfiledFuncs.ContainsKey(address));
|
||||||
|
|
||||||
ProfiledFuncs[address] = new FuncProfile(mode, highCq: true);
|
ProfiledFuncs[address] = new FuncProfile(mode, highCq: true, blacklist ?? ProfiledFuncs[address].Blacklist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -116,7 +127,7 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
|
|
||||||
foreach (KeyValuePair<ulong, FuncProfile> profiledFunc in ProfiledFuncs)
|
foreach (KeyValuePair<ulong, FuncProfile> profiledFunc in ProfiledFuncs)
|
||||||
{
|
{
|
||||||
if (!funcs.ContainsKey(profiledFunc.Key))
|
if (!funcs.ContainsKey(profiledFunc.Key) && !profiledFunc.Value.Blacklist)
|
||||||
{
|
{
|
||||||
profiledFuncsToTranslate.Enqueue((profiledFunc.Key, profiledFunc.Value));
|
profiledFuncsToTranslate.Enqueue((profiledFunc.Key, profiledFunc.Value));
|
||||||
}
|
}
|
||||||
@ -131,6 +142,24 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
ProfiledFuncs.TrimExcess();
|
ProfiledFuncs.TrimExcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ulong> GetBlacklistedFunctions()
|
||||||
|
{
|
||||||
|
List<ulong> funcs = new List<ulong>();
|
||||||
|
|
||||||
|
foreach (var profiledFunc in ProfiledFuncs)
|
||||||
|
{
|
||||||
|
if (profiledFunc.Value.Blacklist)
|
||||||
|
{
|
||||||
|
if (!funcs.Contains(profiledFunc.Key))
|
||||||
|
{
|
||||||
|
funcs.Add(profiledFunc.Key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return funcs;
|
||||||
|
}
|
||||||
|
|
||||||
public void PreLoad()
|
public void PreLoad()
|
||||||
{
|
{
|
||||||
_lastHash = default;
|
_lastHash = default;
|
||||||
@ -221,13 +250,18 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Func<ulong, FuncProfile, (ulong, FuncProfile)> migrateEntryFunc = null;
|
||||||
|
|
||||||
switch (outerHeader.InfoFileVersion)
|
switch (outerHeader.InfoFileVersion)
|
||||||
{
|
{
|
||||||
case InternalVersion:
|
case InternalVersion:
|
||||||
ProfiledFuncs = Deserialize(stream);
|
ProfiledFuncs = Deserialize(stream);
|
||||||
break;
|
break;
|
||||||
case 1866:
|
case 1866:
|
||||||
ProfiledFuncs = Deserialize(stream, (address, profile) => (address + 0x500000UL, profile));
|
migrateEntryFunc = (address, profile) => (address + 0x500000UL, profile);
|
||||||
|
goto case 5518;
|
||||||
|
case 5518:
|
||||||
|
ProfiledFuncs = DeserializeAddBlacklist(stream, migrateEntryFunc);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Logger.Error?.Print(LogClass.Ptc, $"No migration path for {nameof(outerHeader.InfoFileVersion)} '{outerHeader.InfoFileVersion}'. Discarding cache.");
|
Logger.Error?.Print(LogClass.Ptc, $"No migration path for {nameof(outerHeader.InfoFileVersion)} '{outerHeader.InfoFileVersion}'. Discarding cache.");
|
||||||
@ -257,6 +291,16 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
return DeserializeDictionary<ulong, FuncProfile>(stream, DeserializeStructure<FuncProfile>);
|
return DeserializeDictionary<ulong, FuncProfile>(stream, DeserializeStructure<FuncProfile>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Dictionary<ulong, FuncProfile> DeserializeAddBlacklist(Stream stream, Func<ulong, FuncProfile, (ulong, FuncProfile)> migrateEntryFunc = null)
|
||||||
|
{
|
||||||
|
if (migrateEntryFunc != null)
|
||||||
|
{
|
||||||
|
return DeserializeAndUpdateDictionary(stream, (Stream stream) => { return new FuncProfile(DeserializeStructure<FuncProfilePreBlacklist>(stream)); }, migrateEntryFunc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return DeserializeDictionary<ulong, FuncProfile>(stream, (Stream stream) => { return new FuncProfile(DeserializeStructure<FuncProfilePreBlacklist>(stream)); });
|
||||||
|
}
|
||||||
|
|
||||||
private static ReadOnlySpan<byte> GetReadOnlySpan(MemoryStream memoryStream)
|
private static ReadOnlySpan<byte> GetReadOnlySpan(MemoryStream memoryStream)
|
||||||
{
|
{
|
||||||
return new(memoryStream.GetBuffer(), (int)memoryStream.Position, (int)memoryStream.Length - (int)memoryStream.Position);
|
return new(memoryStream.GetBuffer(), (int)memoryStream.Position, (int)memoryStream.Length - (int)memoryStream.Position);
|
||||||
@ -388,13 +432,35 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1/*, Size = 5*/)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1/*, Size = 6*/)]
|
||||||
public struct FuncProfile
|
public struct FuncProfile
|
||||||
{
|
{
|
||||||
public ExecutionMode Mode;
|
public ExecutionMode Mode;
|
||||||
public bool HighCq;
|
public bool HighCq;
|
||||||
|
public bool Blacklist;
|
||||||
|
|
||||||
public FuncProfile(ExecutionMode mode, bool highCq)
|
public FuncProfile(ExecutionMode mode, bool highCq, bool blacklist)
|
||||||
|
{
|
||||||
|
Mode = mode;
|
||||||
|
HighCq = highCq;
|
||||||
|
Blacklist = blacklist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FuncProfile(FuncProfilePreBlacklist fp)
|
||||||
|
{
|
||||||
|
Mode = fp.Mode;
|
||||||
|
HighCq = fp.HighCq;
|
||||||
|
Blacklist = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential, Pack = 1/*, Size = 5*/)]
|
||||||
|
public struct FuncProfilePreBlacklist
|
||||||
|
{
|
||||||
|
public ExecutionMode Mode;
|
||||||
|
public bool HighCq;
|
||||||
|
|
||||||
|
public FuncProfilePreBlacklist(ExecutionMode mode, bool highCq)
|
||||||
{
|
{
|
||||||
Mode = mode;
|
Mode = mode;
|
||||||
HighCq = highCq;
|
HighCq = highCq;
|
||||||
|
@ -249,6 +249,11 @@ namespace ARMeilleure.Translation
|
|||||||
|
|
||||||
ControlFlowGraph cfg = EmitAndGetCFG(context, blocks, out Range funcRange, out Counter<uint> counter);
|
ControlFlowGraph cfg = EmitAndGetCFG(context, blocks, out Range funcRange, out Counter<uint> counter);
|
||||||
|
|
||||||
|
if (cfg == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
ulong funcSize = funcRange.End - funcRange.Start;
|
ulong funcSize = funcRange.End - funcRange.Start;
|
||||||
|
|
||||||
Logger.EndPass(PassName.Translation, cfg);
|
Logger.EndPass(PassName.Translation, cfg);
|
||||||
@ -407,6 +412,11 @@ namespace ARMeilleure.Translation
|
|||||||
if (opCode.Instruction.Emitter != null)
|
if (opCode.Instruction.Emitter != null)
|
||||||
{
|
{
|
||||||
opCode.Instruction.Emitter(context);
|
opCode.Instruction.Emitter(context);
|
||||||
|
if (opCode.Instruction.Name == InstName.Und && blkIndex == 0)
|
||||||
|
{
|
||||||
|
range = new Range(rangeStart, rangeEnd);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
|
|
||||||
foreach (MemoryDefinition memory in memories)
|
foreach (MemoryDefinition memory in memories)
|
||||||
{
|
{
|
||||||
string arraySize = "";
|
string arraySize = string.Empty;
|
||||||
if ((memory.Type & AggregateType.Array) != 0)
|
if ((memory.Type & AggregateType.Array) != 0)
|
||||||
{
|
{
|
||||||
arraySize = $"[{memory.ArrayLength}]";
|
arraySize = $"[{memory.ArrayLength}]";
|
||||||
@ -240,7 +240,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
BufferDefinition buffer = buffers[i];
|
BufferDefinition buffer = buffers[i];
|
||||||
|
|
||||||
bool needsPadding = buffer.Layout == BufferLayout.Std140;
|
bool needsPadding = buffer.Layout == BufferLayout.Std140;
|
||||||
string fsiSuffix = !constant && fsi ? " [[raster_order_group(0)]]" : "";
|
string fsiSuffix = !constant && fsi ? " [[raster_order_group(0)]]" : string.Empty;
|
||||||
|
|
||||||
bufferDec[i] = $"{addressSpace} {Defaults.StructPrefix}_{buffer.Name}* {buffer.Name}{fsiSuffix};";
|
bufferDec[i] = $"{addressSpace} {Defaults.StructPrefix}_{buffer.Name}* {buffer.Name}{fsiSuffix};";
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
type &= ~AggregateType.Array;
|
type &= ~AggregateType.Array;
|
||||||
|
|
||||||
string typeName = GetVarTypeName(type);
|
string typeName = GetVarTypeName(type);
|
||||||
string arraySuffix = "";
|
string arraySuffix = string.Empty;
|
||||||
|
|
||||||
if (field.Type.HasFlag(AggregateType.Array))
|
if (field.Type.HasFlag(AggregateType.Array))
|
||||||
{
|
{
|
||||||
@ -353,7 +353,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
imageTypeName = $"array<{imageTypeName}, {image.ArrayLength}>";
|
imageTypeName = $"array<{imageTypeName}, {image.ArrayLength}>";
|
||||||
}
|
}
|
||||||
|
|
||||||
string fsiSuffix = fsi ? " [[raster_order_group(0)]]" : "";
|
string fsiSuffix = fsi ? " [[raster_order_group(0)]]" : string.Empty;
|
||||||
|
|
||||||
imageDec[i] = $"{imageTypeName} {image.Name}{fsiSuffix};";
|
imageDec[i] = $"{imageTypeName} {image.Name}{fsiSuffix};";
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
IoVariable.VertexIndex => "[[vertex_id]]",
|
IoVariable.VertexIndex => "[[vertex_id]]",
|
||||||
// IoVariable.PointCoord => "[[point_coord]]",
|
// IoVariable.PointCoord => "[[point_coord]]",
|
||||||
IoVariable.UserDefined => context.Definitions.Stage == ShaderStage.Fragment ? $"[[user(loc{ioDefinition.Location})]]" : $"[[attribute({ioDefinition.Location})]]",
|
IoVariable.UserDefined => context.Definitions.Stage == ShaderStage.Fragment ? $"[[user(loc{ioDefinition.Location})]]" : $"[[attribute({ioDefinition.Location})]]",
|
||||||
_ => ""
|
_ => string.Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
context.AppendLine($"{type} {name} {iq}{suffix};");
|
context.AppendLine($"{type} {name} {iq}{suffix};");
|
||||||
@ -545,7 +545,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
IoVariable.FragmentOutputColor => $"[[color({ioDefinition.Location})]]",
|
IoVariable.FragmentOutputColor => $"[[color({ioDefinition.Location})]]",
|
||||||
IoVariable.FragmentOutputDepth => "[[depth(any)]]",
|
IoVariable.FragmentOutputDepth => "[[depth(any)]]",
|
||||||
IoVariable.ClipDistance => $"[[clip_distance]][{Defaults.TotalClipDistances}]",
|
IoVariable.ClipDistance => $"[[clip_distance]][{Defaults.TotalClipDistances}]",
|
||||||
_ => ""
|
_ => string.Empty
|
||||||
};
|
};
|
||||||
|
|
||||||
context.AppendLine($"{type} {name} {suffix};");
|
context.AppendLine($"{type} {name} {suffix};");
|
||||||
|
@ -27,7 +27,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
inputsCount--;
|
inputsCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
string fieldName = "";
|
string fieldName = string.Empty;
|
||||||
switch (storageKind)
|
switch (storageKind)
|
||||||
{
|
{
|
||||||
case StorageKind.ConstantBuffer:
|
case StorageKind.ConstantBuffer:
|
||||||
@ -140,7 +140,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
varName += fieldName;
|
varName += fieldName;
|
||||||
varName += fieldHasPadding ? ".x" : "";
|
varName += fieldHasPadding ? ".x" : string.Empty;
|
||||||
|
|
||||||
if (isStore)
|
if (isStore)
|
||||||
{
|
{
|
||||||
@ -434,7 +434,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
|
|
||||||
string prefix = intCoords ? "uint" : "float";
|
string prefix = intCoords ? "uint" : "float";
|
||||||
|
|
||||||
return prefix + (count > 1 ? count : "") + "(" + coords + ")";
|
return prefix + (count > 1 ? count : string.Empty) + "(" + coords + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
Append(AssemblePVector(pCount));
|
Append(AssemblePVector(pCount));
|
||||||
@ -504,7 +504,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
}
|
}
|
||||||
|
|
||||||
texCallBuilder.Append(')');
|
texCallBuilder.Append(')');
|
||||||
texCallBuilder.Append(colorIsVector ? GetMaskMultiDest(texOp.Index) : "");
|
texCallBuilder.Append(colorIsVector ? GetMaskMultiDest(texOp.Index) : string.Empty);
|
||||||
|
|
||||||
return texCallBuilder.ToString();
|
return texCallBuilder.ToString();
|
||||||
}
|
}
|
||||||
@ -558,7 +558,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
{
|
{
|
||||||
if (mask == 0x0)
|
if (mask == 0x0)
|
||||||
{
|
{
|
||||||
return "";
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
string swizzle = ".";
|
string swizzle = ".";
|
||||||
|
@ -15,7 +15,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||||||
if (parameters.Definitions.Stage is not (ShaderStage.Vertex or ShaderStage.Fragment or ShaderStage.Compute))
|
if (parameters.Definitions.Stage is not (ShaderStage.Vertex or ShaderStage.Fragment or ShaderStage.Compute))
|
||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Gpu, $"Attempted to generate unsupported shader type {parameters.Definitions.Stage}!");
|
Logger.Warning?.Print(LogClass.Gpu, $"Attempted to generate unsupported shader type {parameters.Definitions.Stage}!");
|
||||||
return "";
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
CodeGenContext context = new(info, parameters);
|
CodeGenContext context = new(info, parameters);
|
||||||
|
@ -199,7 +199,7 @@ namespace Ryujinx.Graphics.Shader
|
|||||||
_ => "float"
|
_ => "float"
|
||||||
};
|
};
|
||||||
|
|
||||||
return $"{typeName}<{format}{(image ? ", access::read_write" : "")}>";
|
return $"{typeName}<{format}{(image ? ", access::read_write" : string.Empty)}>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,6 +192,7 @@ namespace Ryujinx.HLE
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The desired hacky workarounds.
|
/// The desired hacky workarounds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>This cannot be changed after <see cref="Switch"/> instantiation.</remarks>
|
||||||
public EnabledDirtyHack[] Hacks { internal get; set; }
|
public EnabledDirtyHack[] Hacks { internal get; set; }
|
||||||
|
|
||||||
public HLEConfiguration(VirtualFileSystem virtualFileSystem,
|
public HLEConfiguration(VirtualFileSystem virtualFileSystem,
|
||||||
|
@ -20,6 +20,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
private readonly string _titleIdText;
|
private readonly string _titleIdText;
|
||||||
private readonly string _displayVersion;
|
private readonly string _displayVersion;
|
||||||
private readonly bool _diskCacheEnabled;
|
private readonly bool _diskCacheEnabled;
|
||||||
|
private readonly string _diskCacheSelector;
|
||||||
private readonly ulong _codeAddress;
|
private readonly ulong _codeAddress;
|
||||||
private readonly ulong _codeSize;
|
private readonly ulong _codeSize;
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
string titleIdText,
|
string titleIdText,
|
||||||
string displayVersion,
|
string displayVersion,
|
||||||
bool diskCacheEnabled,
|
bool diskCacheEnabled,
|
||||||
|
string diskCacheSelector,
|
||||||
ulong codeAddress,
|
ulong codeAddress,
|
||||||
ulong codeSize)
|
ulong codeSize)
|
||||||
{
|
{
|
||||||
@ -39,6 +41,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
_titleIdText = titleIdText;
|
_titleIdText = titleIdText;
|
||||||
_displayVersion = displayVersion;
|
_displayVersion = displayVersion;
|
||||||
_diskCacheEnabled = diskCacheEnabled;
|
_diskCacheEnabled = diskCacheEnabled;
|
||||||
|
_diskCacheSelector = diskCacheSelector;
|
||||||
_codeAddress = codeAddress;
|
_codeAddress = codeAddress;
|
||||||
_codeSize = codeSize;
|
_codeSize = codeSize;
|
||||||
}
|
}
|
||||||
@ -114,7 +117,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DiskCacheLoadState = processContext.Initialize(_titleIdText, _displayVersion, _diskCacheEnabled, _codeAddress, _codeSize, "default"); //Ready for exefs profiles
|
DiskCacheLoadState = processContext.Initialize(_titleIdText, _displayVersion, _diskCacheEnabled, _codeAddress, _codeSize, _diskCacheSelector ?? "default");
|
||||||
|
|
||||||
return processContext;
|
return processContext;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ using LibHac.Loader;
|
|||||||
using LibHac.Tools.Fs;
|
using LibHac.Tools.Fs;
|
||||||
using LibHac.Tools.FsSystem;
|
using LibHac.Tools.FsSystem;
|
||||||
using LibHac.Tools.FsSystem.RomFs;
|
using LibHac.Tools.FsSystem.RomFs;
|
||||||
|
using LibHac.Util;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Utilities;
|
using Ryujinx.Common.Utilities;
|
||||||
@ -19,6 +20,7 @@ using System.Collections.Specialized;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
using LazyFile = Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy.LazyFile;
|
using LazyFile = Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy.LazyFile;
|
||||||
using Path = System.IO.Path;
|
using Path = System.IO.Path;
|
||||||
|
|
||||||
@ -581,6 +583,7 @@ namespace Ryujinx.HLE.HOS
|
|||||||
public BitVector32 Stubs;
|
public BitVector32 Stubs;
|
||||||
public BitVector32 Replaces;
|
public BitVector32 Replaces;
|
||||||
public MetaLoader Npdm;
|
public MetaLoader Npdm;
|
||||||
|
public string Hash;
|
||||||
|
|
||||||
public bool Modified => (Stubs.Data | Replaces.Data) != 0;
|
public bool Modified => (Stubs.Data | Replaces.Data) != 0;
|
||||||
}
|
}
|
||||||
@ -591,8 +594,11 @@ namespace Ryujinx.HLE.HOS
|
|||||||
{
|
{
|
||||||
Stubs = new BitVector32(),
|
Stubs = new BitVector32(),
|
||||||
Replaces = new BitVector32(),
|
Replaces = new BitVector32(),
|
||||||
|
Hash = null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
string tempHash = string.Empty;
|
||||||
|
|
||||||
if (!_appMods.TryGetValue(applicationId, out ModCache mods) || mods.ExefsDirs.Count == 0)
|
if (!_appMods.TryGetValue(applicationId, out ModCache mods) || mods.ExefsDirs.Count == 0)
|
||||||
{
|
{
|
||||||
return modLoadResult;
|
return modLoadResult;
|
||||||
@ -628,8 +634,16 @@ namespace Ryujinx.HLE.HOS
|
|||||||
|
|
||||||
modLoadResult.Replaces[1 << i] = true;
|
modLoadResult.Replaces[1 << i] = true;
|
||||||
|
|
||||||
nsos[i] = new NsoExecutable(nsoFile.OpenRead().AsStorage(), nsoName);
|
using (FileStream stream = nsoFile.OpenRead())
|
||||||
|
{
|
||||||
|
nsos[i] = new NsoExecutable(stream.AsStorage(), nsoName);
|
||||||
Logger.Info?.Print(LogClass.ModLoader, $"NSO '{nsoName}' replaced");
|
Logger.Info?.Print(LogClass.ModLoader, $"NSO '{nsoName}' replaced");
|
||||||
|
using (MD5 md5 = MD5.Create())
|
||||||
|
{
|
||||||
|
stream.Seek(0, SeekOrigin.Begin);
|
||||||
|
tempHash += BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLowerInvariant();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modLoadResult.Stubs[1 << i] |= File.Exists(Path.Combine(mod.Path.FullName, nsoName + StubExtension));
|
modLoadResult.Stubs[1 << i] |= File.Exists(Path.Combine(mod.Path.FullName, nsoName + StubExtension));
|
||||||
@ -661,6 +675,14 @@ namespace Ryujinx.HLE.HOS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(tempHash))
|
||||||
|
{
|
||||||
|
using (MD5 md5 = MD5.Create())
|
||||||
|
{
|
||||||
|
modLoadResult.Hash += BitConverter.ToString(md5.ComputeHash(tempHash.ToBytes())).Replace("-", string.Empty).ToLowerInvariant();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return modLoadResult;
|
return modLoadResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
|
|||||||
|
|
||||||
private void UpdatePassphraseIfNeeded()
|
private void UpdatePassphraseIfNeeded()
|
||||||
{
|
{
|
||||||
string passphrase = _config.MultiplayerLdnPassphrase ?? "";
|
string passphrase = _config.MultiplayerLdnPassphrase ?? string.Empty;
|
||||||
if (passphrase != _passphrase)
|
if (passphrase != _passphrase)
|
||||||
{
|
{
|
||||||
_passphrase = passphrase;
|
_passphrase = passphrase;
|
||||||
|
@ -84,13 +84,6 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
|||||||
// Apply Nsos patches.
|
// Apply Nsos patches.
|
||||||
device.Configuration.VirtualFileSystem.ModLoader.ApplyNsoPatches(programId, nsoExecutables);
|
device.Configuration.VirtualFileSystem.ModLoader.ApplyNsoPatches(programId, nsoExecutables);
|
||||||
|
|
||||||
// Don't use PTC if ExeFS files have been replaced.
|
|
||||||
bool enablePtc = device.System.EnablePtc && !modLoadResult.Modified;
|
|
||||||
if (!enablePtc)
|
|
||||||
{
|
|
||||||
Logger.Warning?.Print(LogClass.Ptc, "Detected unsupported ExeFs modifications. PTC disabled.");
|
|
||||||
}
|
|
||||||
|
|
||||||
string programName = string.Empty;
|
string programName = string.Empty;
|
||||||
|
|
||||||
if (!isHomebrew && programId > 0x010000000000FFFF)
|
if (!isHomebrew && programId > 0x010000000000FFFF)
|
||||||
@ -117,7 +110,8 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
|||||||
device.System.KernelContext,
|
device.System.KernelContext,
|
||||||
metaLoader,
|
metaLoader,
|
||||||
nacpData,
|
nacpData,
|
||||||
enablePtc,
|
device.System.EnablePtc,
|
||||||
|
modLoadResult.Hash,
|
||||||
true,
|
true,
|
||||||
programName,
|
programName,
|
||||||
metaLoader.GetProgramId(),
|
metaLoader.GetProgramId(),
|
||||||
|
@ -235,6 +235,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
dummyExeFs.GetNpdm(),
|
dummyExeFs.GetNpdm(),
|
||||||
nacpData,
|
nacpData,
|
||||||
diskCacheEnabled: false,
|
diskCacheEnabled: false,
|
||||||
|
diskCacheSelector: null,
|
||||||
allowCodeMemoryForJit: true,
|
allowCodeMemoryForJit: true,
|
||||||
programName,
|
programName,
|
||||||
programId,
|
programId,
|
||||||
|
@ -186,6 +186,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
string.Empty,
|
string.Empty,
|
||||||
string.Empty,
|
string.Empty,
|
||||||
false,
|
false,
|
||||||
|
null,
|
||||||
codeAddress,
|
codeAddress,
|
||||||
codeSize);
|
codeSize);
|
||||||
|
|
||||||
@ -226,6 +227,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
MetaLoader metaLoader,
|
MetaLoader metaLoader,
|
||||||
BlitStruct<ApplicationControlProperty> applicationControlProperties,
|
BlitStruct<ApplicationControlProperty> applicationControlProperties,
|
||||||
bool diskCacheEnabled,
|
bool diskCacheEnabled,
|
||||||
|
string diskCacheSelector,
|
||||||
bool allowCodeMemoryForJit,
|
bool allowCodeMemoryForJit,
|
||||||
string name,
|
string name,
|
||||||
ulong programId,
|
ulong programId,
|
||||||
@ -379,6 +381,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
$"{programId:x16}",
|
$"{programId:x16}",
|
||||||
displayVersion,
|
displayVersion,
|
||||||
diskCacheEnabled,
|
diskCacheEnabled,
|
||||||
|
diskCacheSelector,
|
||||||
codeStart,
|
codeStart,
|
||||||
codeSize);
|
codeSize);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||||||
bool isFirmwareApplication = ProgramId <= 0x0100000000007FFF;
|
bool isFirmwareApplication = ProgramId <= 0x0100000000007FFF;
|
||||||
|
|
||||||
string name = !isFirmware
|
string name = !isFirmware
|
||||||
? (isFirmwareApplication ? "Firmware Application " : "") + (!string.IsNullOrWhiteSpace(Name) ? Name : "<Unknown Name>")
|
? (isFirmwareApplication ? "Firmware Application " : string.Empty) + (!string.IsNullOrWhiteSpace(Name) ? Name : "<Unknown Name>")
|
||||||
: "Firmware";
|
: "Firmware";
|
||||||
|
|
||||||
// TODO: LibHac npdm currently doesn't support version field.
|
// TODO: LibHac npdm currently doesn't support version field.
|
||||||
|
@ -2022,6 +2022,56 @@
|
|||||||
"zh_TW": "下一次啟動遊戲時,觸發 PPTC 進行重建"
|
"zh_TW": "下一次啟動遊戲時,觸發 PPTC 進行重建"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "GameListContextMenuCacheManagementNukePptc",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Purge PPTC cache",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": "GameListContextMenuCacheManagementNukePptcToolTip",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "Deletes all PPTC cache files for the Application",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "GameListContextMenuCacheManagementPurgeShaderCache",
|
"ID": "GameListContextMenuCacheManagementPurgeShaderCache",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
@ -7718,7 +7768,7 @@
|
|||||||
"th_TH": "",
|
"th_TH": "",
|
||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "",
|
"zh_CN": "颜色",
|
||||||
"zh_TW": ""
|
"zh_TW": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -12947,6 +12997,31 @@
|
|||||||
"zh_TW": "在 {0} 清除 PPTC 快取時出錯: {1}"
|
"zh_TW": "在 {0} 清除 PPTC 快取時出錯: {1}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "DialogPPTCNukeMessage",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "You are about to purge all PPTC data from:\n\n{0}\n\nAre you sure you want to proceed?",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "DialogShaderDeletionMessage",
|
"ID": "DialogShaderDeletionMessage",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
@ -18943,7 +19018,7 @@
|
|||||||
"th_TH": "",
|
"th_TH": "",
|
||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "",
|
||||||
"zh_CN": "",
|
"zh_CN": "LED 设置",
|
||||||
"zh_TW": ""
|
"zh_TW": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5,6 +5,7 @@ using Ryujinx.Ava.Utilities.Configuration;
|
|||||||
using Ryujinx.Common;
|
using Ryujinx.Common;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
using Ryujinx.Common.Configuration.Hid;
|
using Ryujinx.Common.Configuration.Hid;
|
||||||
|
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||||
using Ryujinx.Common.GraphicsDriver;
|
using Ryujinx.Common.GraphicsDriver;
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.Common.Logging.Targets;
|
using Ryujinx.Common.Logging.Targets;
|
||||||
@ -26,6 +27,7 @@ using Ryujinx.SDL2.Common;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Ryujinx.Headless
|
namespace Ryujinx.Headless
|
||||||
@ -287,6 +289,9 @@ namespace Ryujinx.Headless
|
|||||||
|
|
||||||
DriverUtilities.InitDriverConfig(option.BackendThreading == BackendThreading.Off);
|
DriverUtilities.InitDriverConfig(option.BackendThreading == BackendThreading.Off);
|
||||||
|
|
||||||
|
if (_inputConfiguration.OfType<StandardControllerInputConfig>().Any(ic => ic.Led.UseRainbow))
|
||||||
|
Rainbow.Enable();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
LoadApplication(option);
|
LoadApplication(option);
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
x:DataType="viewModels:UserSelectorDialogViewModel">
|
x:DataType="viewModels:UserSelectorDialogViewModel">
|
||||||
|
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
|
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:UserSelectorDialogViewModel />
|
<viewModels:UserSelectorDialogViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
@ -80,7 +75,7 @@
|
|||||||
Height="96"
|
Height="96"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
MaxWidth="90"
|
MaxWidth="90"
|
||||||
@ -110,12 +105,5 @@
|
|||||||
</ListBox>
|
</ListBox>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<StackPanel
|
|
||||||
Grid.Row="1"
|
|
||||||
Margin="0 24 0 0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Orientation="Horizontal"
|
|
||||||
Spacing="10">
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@ -81,6 +81,11 @@
|
|||||||
Header="{ext:Locale GameListContextMenuCacheManagementPurgePptc}"
|
Header="{ext:Locale GameListContextMenuCacheManagementPurgePptc}"
|
||||||
Icon="{ext:Icon mdi-refresh}"
|
Icon="{ext:Icon mdi-refresh}"
|
||||||
ToolTip.Tip="{ext:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" />
|
ToolTip.Tip="{ext:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" />
|
||||||
|
<MenuItem
|
||||||
|
Click="NukePtcCache_Click"
|
||||||
|
Header="{ext:Locale GameListContextMenuCacheManagementNukePptc}"
|
||||||
|
Icon="{ext:Icon mdi-delete-alert}"
|
||||||
|
ToolTip.Tip="{ext:Locale GameListContextMenuCacheManagementNukePptcToolTip}" />
|
||||||
<MenuItem
|
<MenuItem
|
||||||
Click="PurgeShaderCache_Click"
|
Click="PurgeShaderCache_Click"
|
||||||
Header="{ext:Locale GameListContextMenuCacheManagementPurgeShaderCache}"
|
Header="{ext:Locale GameListContextMenuCacheManagementPurgeShaderCache}"
|
||||||
|
@ -175,6 +175,52 @@ namespace Ryujinx.Ava.UI.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async void NukePtcCache_Click(object sender, RoutedEventArgs args)
|
||||||
|
{
|
||||||
|
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||||
|
return;
|
||||||
|
|
||||||
|
UserResult result = await ContentDialogHelper.CreateLocalizedConfirmationDialog(
|
||||||
|
LocaleManager.Instance[LocaleKeys.DialogWarning],
|
||||||
|
LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogPPTCNukeMessage, viewModel.SelectedApplication.Name)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result == UserResult.Yes)
|
||||||
|
{
|
||||||
|
DirectoryInfo mainDir = new(Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "cpu", "0"));
|
||||||
|
DirectoryInfo backupDir = new(Path.Combine(AppDataManager.GamesDirPath, viewModel.SelectedApplication.IdString, "cache", "cpu", "1"));
|
||||||
|
|
||||||
|
List<FileInfo> cacheFiles = new();
|
||||||
|
|
||||||
|
if (mainDir.Exists)
|
||||||
|
{
|
||||||
|
cacheFiles.AddRange(mainDir.EnumerateFiles("*.cache"));
|
||||||
|
cacheFiles.AddRange(mainDir.EnumerateFiles("*.info"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (backupDir.Exists)
|
||||||
|
{
|
||||||
|
cacheFiles.AddRange(backupDir.EnumerateFiles("*.cache"));
|
||||||
|
cacheFiles.AddRange(mainDir.EnumerateFiles("*.info"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cacheFiles.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (FileInfo file in cacheFiles)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
file.Delete();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogPPTCDeletionErrorMessage, file.Name, ex));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async void PurgeShaderCache_Click(object sender, RoutedEventArgs args)
|
public async void PurgeShaderCache_Click(object sender, RoutedEventArgs args)
|
||||||
{
|
{
|
||||||
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
if (sender is not MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
x:DataType="viewModels:MainWindowViewModel">
|
x:DataType="viewModels:MainWindowViewModel">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
@ -68,7 +65,7 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Icon, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
<Panel
|
<Panel
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Height="50"
|
Height="50"
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
x:DataType="viewModels:MainWindowViewModel">
|
x:DataType="viewModels:MainWindowViewModel">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
@ -62,7 +59,7 @@
|
|||||||
Classes.large="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridLarge}"
|
Classes.large="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridLarge}"
|
||||||
Classes.normal="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridMedium}"
|
Classes.normal="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridMedium}"
|
||||||
Classes.small="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridSmall}"
|
Classes.small="{Binding $parent[UserControl].((viewModels:MainWindowViewModel)DataContext).IsGridSmall}"
|
||||||
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Icon, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
<Border
|
<Border
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="0,0,5,0"
|
Margin="0,0,5,0"
|
||||||
|
@ -9,7 +9,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
{
|
{
|
||||||
internal class BitmapArrayValueConverter : IValueConverter
|
internal class BitmapArrayValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static BitmapArrayValueConverter Instance = new();
|
public static readonly BitmapArrayValueConverter Instance = new();
|
||||||
|
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
{
|
{
|
||||||
internal class DownloadableContentLabelConverter : IMultiValueConverter
|
internal class DownloadableContentLabelConverter : IMultiValueConverter
|
||||||
{
|
{
|
||||||
public static DownloadableContentLabelConverter Instance = new();
|
public static readonly DownloadableContentLabelConverter Instance = new();
|
||||||
|
|
||||||
public object Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
{
|
{
|
||||||
internal class KeyValueConverter : IValueConverter
|
internal class KeyValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static KeyValueConverter Instance = new();
|
public static readonly KeyValueConverter Instance = new();
|
||||||
|
|
||||||
private static readonly Dictionary<Key, LocaleKeys> _keysMap = new()
|
private static readonly Dictionary<Key, LocaleKeys> _keysMap = new()
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
|
||||||
using Ryujinx.Ava.Utilities.AppLibrary;
|
using Ryujinx.Ava.Utilities.AppLibrary;
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@ -19,15 +18,10 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
{
|
{
|
||||||
return $"Hosted Games: {applicationData.GameCount}\nOnline Players: {applicationData.PlayerCount}";
|
return $"Hosted Games: {applicationData.GameCount}\nOnline Players: {applicationData.PlayerCount}";
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
|
||||||
return "";
|
return "";
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
{
|
{
|
||||||
internal class TitleUpdateLabelConverter : IMultiValueConverter
|
internal class TitleUpdateLabelConverter : IMultiValueConverter
|
||||||
{
|
{
|
||||||
public static TitleUpdateLabelConverter Instance = new();
|
public static readonly TitleUpdateLabelConverter Instance = new();
|
||||||
|
|
||||||
public object Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
internal class XCITrimmerFileSpaceSavingsConverter : IValueConverter
|
internal class XCITrimmerFileSpaceSavingsConverter : IValueConverter
|
||||||
{
|
{
|
||||||
private const long _bytesPerMB = 1024 * 1024;
|
private const long _bytesPerMB = 1024 * 1024;
|
||||||
public static XCITrimmerFileSpaceSavingsConverter Instance = new();
|
public static readonly XCITrimmerFileSpaceSavingsConverter Instance = new();
|
||||||
|
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ namespace Ryujinx.Ava.UI.Models
|
|||||||
{
|
{
|
||||||
private bool _isEnabled = false;
|
private bool _isEnabled = false;
|
||||||
public ObservableCollection<CheatNode> SubNodes { get; } = [];
|
public ObservableCollection<CheatNode> SubNodes { get; } = [];
|
||||||
public string CleanName => Name[1..^7];
|
public string CleanName => Name.Length > 0 ? Name[1..^7] : Name;
|
||||||
public string BuildIdKey => $"{BuildId}-{Name}";
|
public string BuildIdKey => $"{BuildId}-{Name}";
|
||||||
public bool IsRootNode { get; }
|
public bool IsRootNode { get; }
|
||||||
public string Name { get; }
|
public string Name { get; }
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:ControllerInputViewModel />
|
<viewModels:ControllerInputViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:KeyValueConverter x:Key="Key" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<UserControl.Styles>
|
<UserControl.Styles>
|
||||||
<Style Selector="ToggleButton">
|
<Style Selector="ToggleButton">
|
||||||
<Setter Property="Width" Value="90" />
|
<Setter Property="Width" Value="90" />
|
||||||
@ -78,7 +75,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonZl">
|
<ToggleButton Name="ButtonZl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonZl, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonZl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -94,7 +91,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonL">
|
<ToggleButton Name="ButtonL">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonL, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonL, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -110,7 +107,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonMinus">
|
<ToggleButton Name="ButtonMinus">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonMinus, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonMinus, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -144,7 +141,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickButton">
|
<ToggleButton Name="LeftStickButton">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickButton, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -161,7 +158,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftJoystick" Tag="stick">
|
<ToggleButton Name="LeftJoystick" Tag="stick">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftJoystick, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftJoystick, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -254,7 +251,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadUp">
|
<ToggleButton Name="DpadUp">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadUp, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadUp, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -271,7 +268,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadDown">
|
<ToggleButton Name="DpadDown">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadDown, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadDown, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -288,7 +285,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadLeft">
|
<ToggleButton Name="DpadLeft">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadLeft, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadLeft, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -305,7 +302,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadRight">
|
<ToggleButton Name="DpadRight">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadRight, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadRight, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -454,7 +451,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftButtonSr">
|
<ToggleButton Name="LeftButtonSr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftButtonSr, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -472,7 +469,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftButtonSl">
|
<ToggleButton Name="LeftButtonSl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftButtonSl, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -490,7 +487,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightButtonSr">
|
<ToggleButton Name="RightButtonSr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightButtonSr, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -508,7 +505,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightButtonSl">
|
<ToggleButton Name="RightButtonSl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightButtonSl, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -636,7 +633,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonZr">
|
<ToggleButton Name="ButtonZr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonZr, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonZr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -654,7 +651,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonR">
|
<ToggleButton Name="ButtonR">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonR, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonR, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -672,7 +669,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonPlus">
|
<ToggleButton Name="ButtonPlus">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonPlus, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonPlus, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -707,7 +704,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonA">
|
<ToggleButton Name="ButtonA">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonA, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonA, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -724,7 +721,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonB">
|
<ToggleButton Name="ButtonB">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonB, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonB, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -741,7 +738,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonX">
|
<ToggleButton Name="ButtonX">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonX, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonX, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -758,7 +755,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonY">
|
<ToggleButton Name="ButtonY">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonY, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonY, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -792,7 +789,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickButton">
|
<ToggleButton Name="RightStickButton">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickButton, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -810,7 +807,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightJoystick" Tag="stick">
|
<ToggleButton Name="RightJoystick" Tag="stick">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightJoystick, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightJoystick, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:KeyboardInputViewModel />
|
<viewModels:KeyboardInputViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:KeyValueConverter x:Key="Key" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<UserControl.Styles>
|
<UserControl.Styles>
|
||||||
<Style Selector="ToggleButton">
|
<Style Selector="ToggleButton">
|
||||||
<Setter Property="Width" Value="90" />
|
<Setter Property="Width" Value="90" />
|
||||||
@ -76,7 +73,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonZl">
|
<ToggleButton Name="ButtonZl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonZl, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonZl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -92,7 +89,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonL">
|
<ToggleButton Name="ButtonL">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonL, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonL, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -108,7 +105,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonMinus">
|
<ToggleButton Name="ButtonMinus">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonMinus, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonMinus, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -143,7 +140,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickButton">
|
<ToggleButton Name="LeftStickButton">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickButton, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -160,7 +157,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickUp">
|
<ToggleButton Name="LeftStickUp">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickUp, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickUp, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -177,7 +174,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickDown">
|
<ToggleButton Name="LeftStickDown">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickDown, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickDown, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -194,7 +191,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickLeft">
|
<ToggleButton Name="LeftStickLeft">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickLeft, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickLeft, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -211,7 +208,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftStickRight">
|
<ToggleButton Name="LeftStickRight">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftStickRight, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftStickRight, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -247,7 +244,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadUp">
|
<ToggleButton Name="DpadUp">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadUp, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadUp, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -264,7 +261,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadDown">
|
<ToggleButton Name="DpadDown">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadDown, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadDown, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -281,7 +278,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadLeft">
|
<ToggleButton Name="DpadLeft">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadLeft, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadLeft, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -298,7 +295,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="DpadRight">
|
<ToggleButton Name="DpadRight">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.DpadRight, Converter={StaticResource Key}}"
|
Text="{Binding Config.DpadRight, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -408,7 +405,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftButtonSr">
|
<ToggleButton Name="LeftButtonSr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftButtonSr, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -426,7 +423,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="LeftButtonSl">
|
<ToggleButton Name="LeftButtonSl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.LeftButtonSl, Converter={StaticResource Key}}"
|
Text="{Binding Config.LeftButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -444,7 +441,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightButtonSr">
|
<ToggleButton Name="RightButtonSr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightButtonSr, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightButtonSr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -462,7 +459,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightButtonSl">
|
<ToggleButton Name="RightButtonSl">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightButtonSl, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightButtonSl, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -504,7 +501,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonZr">
|
<ToggleButton Name="ButtonZr">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonZr, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonZr, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -522,7 +519,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonR">
|
<ToggleButton Name="ButtonR">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonR, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonR, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -540,7 +537,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonPlus">
|
<ToggleButton Name="ButtonPlus">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonPlus, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonPlus, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -575,7 +572,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonA">
|
<ToggleButton Name="ButtonA">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonA, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonA, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -592,7 +589,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonB">
|
<ToggleButton Name="ButtonB">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonB, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonB, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -609,7 +606,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonX">
|
<ToggleButton Name="ButtonX">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonX, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonX, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -626,7 +623,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="ButtonY">
|
<ToggleButton Name="ButtonY">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.ButtonY, Converter={StaticResource Key}}"
|
Text="{Binding Config.ButtonY, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -661,7 +658,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickButton">
|
<ToggleButton Name="RightStickButton">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickButton, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickButton, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -678,7 +675,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickUp">
|
<ToggleButton Name="RightStickUp">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickUp, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickUp, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -695,7 +692,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickDown">
|
<ToggleButton Name="RightStickDown">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickDown, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickDown, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -712,7 +709,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickLeft">
|
<ToggleButton Name="RightStickLeft">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickLeft, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickLeft, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@ -729,7 +726,7 @@
|
|||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
<ToggleButton Name="RightStickRight">
|
<ToggleButton Name="RightStickRight">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Config.RightStickRight, Converter={StaticResource Key}}"
|
Text="{Binding Config.RightStickRight, Converter={x:Static helpers:KeyValueConverter.Instance}}"
|
||||||
TextAlignment="Center" />
|
TextAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:SettingsViewModel />
|
<viewModels:SettingsViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:KeyValueConverter x:Key="Key" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<UserControl.Styles>
|
<UserControl.Styles>
|
||||||
<Style Selector="StackPanel > StackPanel">
|
<Style Selector="StackPanel > StackPanel">
|
||||||
<Setter Property="Margin" Value="10, 0, 0, 0" />
|
<Setter Property="Margin" Value="10, 0, 0, 0" />
|
||||||
@ -52,67 +49,67 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleVSyncModeHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleVSyncModeHotkey}" />
|
||||||
<ToggleButton Name="ToggleVSyncMode">
|
<ToggleButton Name="ToggleVSyncMode">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleVSyncMode, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.ToggleVSyncMode, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysScreenshotHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysScreenshotHotkey}" />
|
||||||
<ToggleButton Name="Screenshot">
|
<ToggleButton Name="Screenshot">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.Screenshot, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysShowUiHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysShowUiHotkey}" />
|
||||||
<ToggleButton Name="ShowUI">
|
<ToggleButton Name="ShowUI">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.ShowUI, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysPauseHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysPauseHotkey}" />
|
||||||
<ToggleButton Name="Pause">
|
<ToggleButton Name="Pause">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.Pause, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleMuteHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysToggleMuteHotkey}" />
|
||||||
<ToggleButton Name="ToggleMute">
|
<ToggleButton Name="ToggleMute">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.ToggleMute, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleUpHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleUpHotkey}" />
|
||||||
<ToggleButton Name="ResScaleUp">
|
<ToggleButton Name="ResScaleUp">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.ResScaleUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleDownHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysResScaleDownHotkey}" />
|
||||||
<ToggleButton Name="ResScaleDown">
|
<ToggleButton Name="ResScaleDown">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.ResScaleDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeUpHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeUpHotkey}" />
|
||||||
<ToggleButton Name="VolumeUp">
|
<ToggleButton Name="VolumeUp">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.VolumeUp, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeDownHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysVolumeDownHotkey}" />
|
||||||
<ToggleButton Name="VolumeDown">
|
<ToggleButton Name="VolumeDown">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.VolumeDown, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysIncrementCustomVSyncIntervalHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysIncrementCustomVSyncIntervalHotkey}" />
|
||||||
<ToggleButton Name="CustomVSyncIntervalIncrement">
|
<ToggleButton Name="CustomVSyncIntervalIncrement">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalIncrement, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalIncrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||||
<TextBlock Text="{ext:Locale SettingsTabHotkeysDecrementCustomVSyncIntervalHotkey}" />
|
<TextBlock Text="{ext:Locale SettingsTabHotkeysDecrementCustomVSyncIntervalHotkey}" />
|
||||||
<ToggleButton Name="CustomVSyncIntervalDecrement">
|
<ToggleButton Name="CustomVSyncIntervalDecrement">
|
||||||
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalDecrement, Converter={StaticResource Key}}" />
|
<TextBlock Text="{Binding KeyboardHotkey.CustomVSyncIntervalDecrement, Converter={x:Static helpers:KeyValueConverter.Instance}}" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -7,23 +7,26 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||||||
{
|
{
|
||||||
public partial class SettingsNetworkView : UserControl
|
public partial class SettingsNetworkView : UserControl
|
||||||
{
|
{
|
||||||
|
private readonly Random _random;
|
||||||
|
|
||||||
public SettingsViewModel ViewModel;
|
public SettingsViewModel ViewModel;
|
||||||
|
|
||||||
public SettingsNetworkView()
|
public SettingsNetworkView()
|
||||||
{
|
{
|
||||||
|
_random = new Random();
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GenLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
private void GenLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
byte[] code = new byte[4];
|
byte[] code = new byte[4];
|
||||||
new Random().NextBytes(code);
|
_random.NextBytes(code);
|
||||||
ViewModel.LdnPassphrase = $"Ryujinx-{BitConverter.ToUInt32(code):x8}";
|
ViewModel.LdnPassphrase = $"Ryujinx-{BitConverter.ToUInt32(code):x8}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
private void ClearLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
ViewModel.LdnPassphrase = "";
|
ViewModel.LdnPassphrase = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:DataType="viewModels:SettingsViewModel">
|
x:DataType="viewModels:SettingsViewModel">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:TimeZoneConverter x:Key="TimeZone" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:SettingsViewModel />
|
<viewModels:SettingsViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
@ -162,7 +159,7 @@
|
|||||||
Text="{Binding Path=TimeZone, Mode=OneWay}"
|
Text="{Binding Path=TimeZone, Mode=OneWay}"
|
||||||
TextChanged="TimeZoneBox_OnTextChanged"
|
TextChanged="TimeZoneBox_OnTextChanged"
|
||||||
ToolTip.Tip="{ext:Locale TimezoneTooltip}"
|
ToolTip.Tip="{ext:Locale TimezoneTooltip}"
|
||||||
ValueMemberBinding="{Binding Mode=OneWay, Converter={StaticResource TimeZone}}" />
|
ValueMemberBinding="{Binding Mode=OneWay, Converter={x:Static helpers:TimeZoneConverter.Instance}}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
x:DataType="models:TempProfile">
|
x:DataType="models:TempProfile">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid Margin="0">
|
<Grid Margin="0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
@ -74,7 +71,7 @@
|
|||||||
Margin="0"
|
Margin="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
</Panel>
|
</Panel>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -17,9 +17,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:UserFirmwareAvatarSelectorViewModel />
|
<viewModels:UserFirmwareAvatarSelectorViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="0"
|
Margin="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
@ -62,7 +59,7 @@
|
|||||||
<Panel
|
<Panel
|
||||||
Background="{Binding BackgroundColor}"
|
Background="{Binding BackgroundColor}"
|
||||||
Margin="5">
|
Margin="5">
|
||||||
<Image Source="{Binding Data, Converter={StaticResource ByteImage}}" />
|
<Image Source="{Binding Data, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
</Panel>
|
</Panel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
|
@ -19,9 +19,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:UserSaveManagerViewModel />
|
<viewModels:UserSaveManagerViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@ -147,7 +144,7 @@
|
|||||||
IsVisible="{Binding InGameList}"
|
IsVisible="{Binding InGameList}"
|
||||||
Width="42"
|
Width="42"
|
||||||
Height="42"
|
Height="42"
|
||||||
Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Icon, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
MaxLines="3"
|
MaxLines="3"
|
||||||
Width="320"
|
Width="320"
|
||||||
|
@ -15,9 +15,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
x:DataType="viewModels:UserProfileViewModel">
|
x:DataType="viewModels:UserProfileViewModel">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:UserProfileViewModel />
|
<viewModels:UserProfileViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
@ -74,7 +71,7 @@
|
|||||||
Height="96"
|
Height="96"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
MaxWidth="90"
|
MaxWidth="90"
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
||||||
Width="500"
|
Width="600"
|
||||||
Height="500"
|
Height="750"
|
||||||
MinWidth="500"
|
MinWidth="500"
|
||||||
MinHeight="500"
|
MinHeight="500"
|
||||||
x:DataType="window:CheatWindow"
|
x:DataType="window:CheatWindow"
|
||||||
|
@ -34,6 +34,9 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
|
|
||||||
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
||||||
{
|
{
|
||||||
|
MinWidth = 500;
|
||||||
|
MinHeight = 650;
|
||||||
|
|
||||||
LoadedCheats = [];
|
LoadedCheats = [];
|
||||||
IntegrityCheckLevel checkLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks
|
IntegrityCheckLevel checkLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks
|
||||||
? IntegrityCheckLevel.ErrorOnInvalid
|
? IntegrityCheckLevel.ErrorOnInvalid
|
||||||
|
@ -30,9 +30,6 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:MainWindowViewModel />
|
<viewModels:MainWindowViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<Window.Resources>
|
|
||||||
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
|
||||||
</Window.Resources>
|
|
||||||
<Window.KeyBindings>
|
<Window.KeyBindings>
|
||||||
<KeyBinding Gesture="Alt+Return" Command="{Binding ToggleFullscreen}" />
|
<KeyBinding Gesture="Alt+Return" Command="{Binding ToggleFullscreen}" />
|
||||||
<KeyBinding Gesture="F11" Command="{Binding ToggleFullscreen}" />
|
<KeyBinding Gesture="F11" Command="{Binding ToggleFullscreen}" />
|
||||||
@ -121,7 +118,7 @@
|
|||||||
Width="256"
|
Width="256"
|
||||||
Height="256"
|
Height="256"
|
||||||
IsVisible="{Binding ShowLoadProgress}"
|
IsVisible="{Binding ShowLoadProgress}"
|
||||||
Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" />
|
Source="{Binding SelectedIcon, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||||
</Border>
|
</Border>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
@ -14,9 +14,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:DataType="viewModels:TitleUpdateViewModel"
|
x:DataType="viewModels:TitleUpdateViewModel"
|
||||||
Focusable="True">
|
Focusable="True">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:TitleUpdateLabelConverter x:Key="TitleUpdateLabel" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid RowDefinitions="Auto,*,Auto">
|
<Grid RowDefinitions="Auto,*,Auto">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
@ -57,7 +54,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap">
|
TextWrapping="Wrap">
|
||||||
<TextBlock.Text>
|
<TextBlock.Text>
|
||||||
<MultiBinding Converter="{StaticResource TitleUpdateLabel}">
|
<MultiBinding Converter="{x:Static helpers:TitleUpdateLabelConverter.Instance}">
|
||||||
<Binding Path="DisplayVersion" />
|
<Binding Path="DisplayVersion" />
|
||||||
<Binding Path="IsBundled" />
|
<Binding Path="IsBundled" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
x:DataType="viewModels:XCITrimmerViewModel"
|
x:DataType="viewModels:XCITrimmerViewModel"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
|
||||||
<helpers:XCITrimmerFileStatusConverter x:Key="StatusLabel" />
|
|
||||||
<helpers:XCITrimmerFileStatusDetailConverter x:Key="StatusDetailLabel" />
|
|
||||||
<helpers:XCITrimmerFileSpaceSavingsConverter x:Key="SpaceSavingsLabel" />
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Grid Margin="20 0 20 0">
|
<Grid Margin="20 0 20 0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@ -186,7 +181,7 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
MaxLines="1"
|
MaxLines="1"
|
||||||
Text="{Binding ., Converter={StaticResource StatusLabel}}">
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusConverter.Instance}}">
|
||||||
<ToolTip.Tip>
|
<ToolTip.Tip>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
IsVisible="{Binding IsFailed}">
|
IsVisible="{Binding IsFailed}">
|
||||||
@ -194,7 +189,7 @@
|
|||||||
Classes="h1"
|
Classes="h1"
|
||||||
Text="{ext:Locale XCITrimmerTitleStatusFailed}" />
|
Text="{ext:Locale XCITrimmerTitleStatusFailed}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding ., Converter={StaticResource StatusDetailLabel}}"
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileStatusDetailConverter.Instance}}"
|
||||||
MaxLines="5"
|
MaxLines="5"
|
||||||
MaxWidth="200"
|
MaxWidth="200"
|
||||||
MaxHeight="100"
|
MaxHeight="100"
|
||||||
@ -209,7 +204,7 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
MaxLines="1"
|
MaxLines="1"
|
||||||
Text="{Binding ., Converter={StaticResource SpaceSavingsLabel}}">>
|
Text="{Binding ., Converter={x:Static helpers:XCITrimmerFileSpaceSavingsConverter.Instance}}">>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -204,8 +204,8 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
Multiplayer.LanInterfaceId.Value = "0";
|
Multiplayer.LanInterfaceId.Value = "0";
|
||||||
Multiplayer.Mode.Value = MultiplayerMode.Disabled;
|
Multiplayer.Mode.Value = MultiplayerMode.Disabled;
|
||||||
Multiplayer.DisableP2p.Value = false;
|
Multiplayer.DisableP2p.Value = false;
|
||||||
Multiplayer.LdnPassphrase.Value = "";
|
Multiplayer.LdnPassphrase.Value = string.Empty;
|
||||||
Multiplayer.LdnServer.Value = "";
|
Multiplayer.LdnServer.Value = string.Empty;
|
||||||
UI.GuiColumns.FavColumn.Value = true;
|
UI.GuiColumns.FavColumn.Value = true;
|
||||||
UI.GuiColumns.IconColumn.Value = true;
|
UI.GuiColumns.IconColumn.Value = true;
|
||||||
UI.GuiColumns.AppColumn.Value = true;
|
UI.GuiColumns.AppColumn.Value = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user