summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc_wrap.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-21 04:07:39 +0200
committerGitHub <noreply@github.com>2020-10-21 04:07:39 +0200
commit3d592972dc3fd61cc88771b889eff237e4e03e0f (patch)
tree0dbc65ac86e609ae22087c7be9d4759ac6b73004 /src/core/hle/kernel/svc_wrap.h
parentkernel: Fix build with recent compiler flag changes (diff)
downloadyuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.gz
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.bz2
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.lz
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.xz
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.tar.zst
yuzu-3d592972dc3fd61cc88771b889eff237e4e03e0f.zip
Diffstat (limited to 'src/core/hle/kernel/svc_wrap.h')
-rw-r--r--src/core/hle/kernel/svc_wrap.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index 9284a4c84..0b6dd9df0 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -11,11 +11,11 @@
namespace Kernel {
-static inline u64 Param(const Core::System& system, std::size_t n) {
+static inline u64 Param(const Core::System& system, int n) {
return system.CurrentArmInterface().GetReg(n);
}
-static inline u32 Param32(const Core::System& system, std::size_t n) {
+static inline u32 Param32(const Core::System& system, int n) {
return static_cast<u32>(system.CurrentArmInterface().GetReg(n));
}
@@ -29,7 +29,7 @@ static inline void FuncReturn(Core::System& system, u64 result) {
}
static inline void FuncReturn32(Core::System& system, u32 result) {
- system.CurrentArmInterface().SetReg(0, static_cast<u64>(result));
+ system.CurrentArmInterface().SetReg(0, (u64)result);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -386,10 +386,9 @@ template <ResultCode func(Core::System&, Handle*, u32, u32, u32, u32, s32)>
void SvcWrap32(Core::System& system) {
Handle param_1 = 0;
- const u32 retval =
- func(system, &param_1, Param32(system, 0), Param32(system, 1), Param32(system, 2),
- Param32(system, 3), static_cast<s32>(Param32(system, 4)))
- .raw;
+ const u32 retval = func(system, &param_1, Param32(system, 0), Param32(system, 1),
+ Param32(system, 2), Param32(system, 3), Param32(system, 4))
+ .raw;
system.CurrentArmInterface().SetReg(1, param_1);
FuncReturn(system, retval);
@@ -543,8 +542,8 @@ void SvcWrap32(Core::System& system) {
template <ResultCode func(Core::System&, u32, u32, s32, u32, Handle*)>
void SvcWrap32(Core::System& system) {
u32 param_1 = 0;
- const u32 retval = func(system, Param32(system, 0), Param32(system, 1),
- static_cast<s32>(Param32(system, 2)), Param32(system, 3), &param_1)
+ const u32 retval = func(system, Param32(system, 0), Param32(system, 1), Param32(system, 2),
+ Param32(system, 3), &param_1)
.raw;
system.CurrentArmInterface().SetReg(1, param_1);
FuncReturn(system, retval);