aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Svc
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Core/OsHle/Svc')
-rw-r--r--Ryujinx.Core/OsHle/Svc/SvcHandler.cs1
-rw-r--r--Ryujinx.Core/OsHle/Svc/SvcThread.cs7
2 files changed, 8 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Svc/SvcHandler.cs b/Ryujinx.Core/OsHle/Svc/SvcHandler.cs
index 3ce56a3c..3bdb1060 100644
--- a/Ryujinx.Core/OsHle/Svc/SvcHandler.cs
+++ b/Ryujinx.Core/OsHle/Svc/SvcHandler.cs
@@ -40,6 +40,7 @@ namespace Ryujinx.Core.OsHle.Svc
{ 0x0c, SvcGetThreadPriority },
{ 0x0d, SvcSetThreadPriority },
{ 0x0f, SvcSetThreadCoreMask },
+ { 0x10, SvcGetCurrentProcessorNumber },
{ 0x12, SvcClearEvent },
{ 0x13, SvcMapSharedMemory },
{ 0x14, SvcUnmapSharedMemory },
diff --git a/Ryujinx.Core/OsHle/Svc/SvcThread.cs b/Ryujinx.Core/OsHle/Svc/SvcThread.cs
index f58c2dc0..c58cffca 100644
--- a/Ryujinx.Core/OsHle/Svc/SvcThread.cs
+++ b/Ryujinx.Core/OsHle/Svc/SvcThread.cs
@@ -117,6 +117,13 @@ namespace Ryujinx.Core.OsHle.Svc
//TODO: Error codes.
}
+ private void SvcGetCurrentProcessorNumber(AThreadState ThreadState)
+ {
+ KThread CurrThread = Process.GetThread(ThreadState.Tpidr);
+
+ ThreadState.X0 = (ulong)CurrThread.ProcessorId;
+ }
+
private void SvcGetThreadId(AThreadState ThreadState)
{
int Handle = (int)ThreadState.X1;