mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-16 04:37:02 +00:00
Merge branch 'libryujinx_bionic_cheats' into 'libryujinx_bionic'
Added Cheat Support See merge request kenji-nx/ryujinx!8
This commit is contained in:
commit
5738728fa3
3 changed files with 37 additions and 8 deletions
|
|
@ -24,7 +24,7 @@
|
||||||
<Type Name="Silk.NET.Vulkan.Extensions.KHR.KhrSwapchain"
|
<Type Name="Silk.NET.Vulkan.Extensions.KHR.KhrSwapchain"
|
||||||
Dynamic="Required All"/>
|
Dynamic="Required All"/>
|
||||||
</Assembly>
|
</Assembly>
|
||||||
<Assembly Name="Ryujinx.HLE">
|
<Assembly Name="Ryujinx.HLE" Dynamic="Required All">
|
||||||
<Type Name="Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.NvHostGpuDeviceFile"
|
<Type Name="Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.NvHostGpuDeviceFile"
|
||||||
Dynamic="Required All" />
|
Dynamic="Required All" />
|
||||||
<Type Name="Ryujinx.HLE.HOS.Services.Fs.IFileSystemProxyForLoader"
|
<Type Name="Ryujinx.HLE.HOS.Services.Fs.IFileSystemProxyForLoader"
|
||||||
|
|
@ -531,6 +531,27 @@
|
||||||
Dynamic="Required All" />
|
Dynamic="Required All" />
|
||||||
<Type Name="Ryujinx.HLE.HOS.Services.Pcv.Rgltr.IRegulatorManager"
|
<Type Name="Ryujinx.HLE.HOS.Services.Pcv.Rgltr.IRegulatorManager"
|
||||||
Dynamic="Required All" />
|
Dynamic="Required All" />
|
||||||
|
<!-- Explicitly root the generic tamper operations that are built via MakeGenericType -->
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.Byte]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt16]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt32]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt64]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.Byte]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt16]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt32]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt64]]"
|
||||||
|
Dynamic="Required All" />
|
||||||
|
|
||||||
</Assembly>
|
</Assembly>
|
||||||
|
<!-- AOT/Trimming: keep dynamic binder & expression tree runtime -->
|
||||||
|
<Assembly Name="Microsoft.CSharp" Dynamic="Required All" />
|
||||||
|
<Assembly Name="System.Linq.Expressions" Dynamic="Required All" />
|
||||||
</Application>
|
</Application>
|
||||||
</Directives>
|
</Directives>
|
||||||
|
|
@ -50,6 +50,9 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
_programs.Enqueue(program);
|
_programs.Enqueue(program);
|
||||||
_programDictionary.TryAdd($"{buildId}-{name}", program);
|
_programDictionary.TryAdd($"{buildId}-{name}", program);
|
||||||
|
|
||||||
|
// NEW: Enable by default (on Android there is currently no UI that calls EnableCheats)
|
||||||
|
program.IsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Activate();
|
Activate();
|
||||||
|
|
@ -139,6 +142,12 @@ namespace Ryujinx.HLE.HOS
|
||||||
// Re-enqueue the tampering program because the process is still valid.
|
// Re-enqueue the tampering program because the process is still valid.
|
||||||
_programs.Enqueue(program);
|
_programs.Enqueue(program);
|
||||||
|
|
||||||
|
// NEW: If the cheat is (still) disabled — keep rotating, do not execute.
|
||||||
|
if (!program.IsEnabled)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Debug?.Print(LogClass.TamperMachine, $"Running tampering program {program.Name}");
|
Logger.Debug?.Print(LogClass.TamperMachine, $"Running tampering program {program.Name}");
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
@ -159,10 +168,8 @@ namespace Ryujinx.HLE.HOS
|
||||||
{
|
{
|
||||||
Logger.Debug?.Print(LogClass.TamperMachine, $"The tampering program {program.Name} crashed, this can happen while the game is starting");
|
Logger.Debug?.Print(LogClass.TamperMachine, $"The tampering program {program.Name} crashed, this can happen while the game is starting");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(ex.Message))
|
// NEW: log full stack trace
|
||||||
{
|
Logger.Debug?.Print(LogClass.TamperMachine, ex.ToString());
|
||||||
Logger.Debug?.Print(LogClass.TamperMachine, ex.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -170,7 +177,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
public void UpdateInput(List<GamepadInput> gamepadInputs)
|
public void UpdateInput(List<GamepadInput> gamepadInputs)
|
||||||
{
|
{
|
||||||
// Look for the input of the player one or the handheld.
|
// Look for the input of player one or the handheld.
|
||||||
foreach (GamepadInput input in gamepadInputs)
|
foreach (GamepadInput input in gamepadInputs)
|
||||||
{
|
{
|
||||||
if (input.PlayerId is PlayerIndex.Player1 or PlayerIndex.Handheld)
|
if (input.PlayerId is PlayerIndex.Player1 or PlayerIndex.Handheld)
|
||||||
|
|
@ -181,7 +188,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the input because player one is not conected.
|
// Clear the input because player one is not connected.
|
||||||
Volatile.Write(ref _pressedKeys, 0);
|
Volatile.Write(ref _pressedKeys, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
<IsTrimmable>false</IsTrimmable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue