diff options
author | Mai M <mathew1800@gmail.com> | 2022-02-17 04:49:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 04:49:56 +0100 |
commit | c48b9668f07173166ac00f09d2d2ad9644157789 (patch) | |
tree | e2b6baa9ac916477fe43ddd24df3f23f62e581e2 /src/core/hle/kernel/svc_wrap.h | |
parent | Merge pull request #7878 from german77/mnpp (diff) | |
parent | kernel: svc: Add OutputDebugString32, CreateCodeMemory32, ControlCodeMemory32 (diff) | |
download | yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar.gz yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar.bz2 yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar.lz yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar.xz yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.tar.zst yuzu-c48b9668f07173166ac00f09d2d2ad9644157789.zip |
Diffstat (limited to 'src/core/hle/kernel/svc_wrap.h')
-rw-r--r-- | src/core/hle/kernel/svc_wrap.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h index a60adfcab..d309f166c 100644 --- a/src/core/hle/kernel/svc_wrap.h +++ b/src/core/hle/kernel/svc_wrap.h @@ -669,4 +669,26 @@ void SvcWrap32(Core::System& system) { FuncReturn(system, retval); } +// Used by CreateCodeMemory32 +template <ResultCode func(Core::System&, Handle*, u32, u32)> +void SvcWrap32(Core::System& system) { + Handle handle = 0; + + const u32 retval = func(system, &handle, Param32(system, 1), Param32(system, 2)).raw; + + system.CurrentArmInterface().SetReg(1, handle); + FuncReturn(system, retval); +} + +// Used by ControlCodeMemory32 +template <ResultCode func(Core::System&, Handle, u32, u64, u64, Svc::MemoryPermission)> +void SvcWrap32(Core::System& system) { + const u32 retval = + func(system, Param32(system, 0), Param32(system, 1), Param(system, 2), Param(system, 4), + static_cast<Svc::MemoryPermission>(Param32(system, 6))) + .raw; + + FuncReturn(system, retval); +} + } // namespace Kernel |