diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs index 5e795d35..cb693f59 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/SyscallHandler.cs @@ -1,4 +1,4 @@ -using ARMeilleure.State; +using Ryujinx.Cpu; using Ryujinx.HLE.HOS.Kernel.Threading; using System; @@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall _syscall64 = new Syscall64(context.Syscall); } - public void SvcCall(object sender, InstExceptionEventArgs e) + public void SvcCall(IExecutionContext context, ulong address, int id) { KThread currentThread = KernelStatic.GetCurrentThread(); @@ -34,26 +34,24 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall _context.CriticalSection.Leave(); } - ExecutionContext context = (ExecutionContext)sender; - if (context.IsAarch32) { - var svcFunc = SyscallTable.SvcTable32[e.Id]; + var svcFunc = SyscallTable.SvcTable32[id]; if (svcFunc == null) { - throw new NotImplementedException($"SVC 0x{e.Id:X4} is not implemented."); + throw new NotImplementedException($"SVC 0x{id:X4} is not implemented."); } svcFunc(_syscall32, context); } else { - var svcFunc = SyscallTable.SvcTable64[e.Id]; + var svcFunc = SyscallTable.SvcTable64[id]; if (svcFunc == null) { - throw new NotImplementedException($"SVC 0x{e.Id:X4} is not implemented."); + throw new NotImplementedException($"SVC 0x{id:X4} is not implemented."); } svcFunc(_syscall64, context); |