From a67d4064f0ca51d46d711589de32b2bc9cc0663d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 18 Apr 2019 00:18:53 -0700 Subject: [PATCH] pm: update with new meme command for 8.0.0 --- stratosphere/libstratosphere | 2 +- stratosphere/pm/source/pm_shell.cpp | 12 ++++++++++++ stratosphere/pm/source/pm_shell.hpp | 7 ++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/stratosphere/libstratosphere b/stratosphere/libstratosphere index b9724cdca..163d9259a 160000 --- a/stratosphere/libstratosphere +++ b/stratosphere/libstratosphere @@ -1 +1 @@ -Subproject commit b9724cdcadd5ea5fbead8f1a9c9b7de11daf6b60 +Subproject commit 163d9259a365c3a89c1a837b28e7609d45795e40 diff --git a/stratosphere/pm/source/pm_shell.cpp b/stratosphere/pm/source/pm_shell.cpp index dc81c4b24..2b0f2a6ab 100644 --- a/stratosphere/pm/source/pm_shell.cpp +++ b/stratosphere/pm/source/pm_shell.cpp @@ -111,3 +111,15 @@ Result ShellService::BoostSystemThreadsResourceLimit() { /* We will simply not reduce the number of system threads available for no reason. */ return ResultSuccess; } + + +Result ShellService::GetUnimplementedEventHandle(Out event) { + /* In 8.0.0, Nintendo added this command which should return an event handle. */ + /* In addition, they also added code to create a new event in the global PM constructor. */ + /* However, nothing signals this event, and this command currently does std::abort();. */ + /* We will oblige. */ + std::abort(); + + /* TODO: Return an event handle, once N makes this command a real thing in the future. */ + /* TODO: return ResultSuccess; */ +} diff --git a/stratosphere/pm/source/pm_shell.hpp b/stratosphere/pm/source/pm_shell.hpp index b36c30454..24aa34030 100644 --- a/stratosphere/pm/source/pm_shell.hpp +++ b/stratosphere/pm/source/pm_shell.hpp @@ -43,7 +43,8 @@ enum ShellCmd_5X { Shell_Cmd_5X_GetApplicationProcessId = 6, Shell_Cmd_5X_BoostSystemMemoryResourceLimit = 7, - Shell_Cmd_BoostSystemThreadsResourceLimit = 8 + Shell_Cmd_BoostSystemThreadsResourceLimit = 8, + Shell_Cmd_GetUnimplementedEventHandle = 9 /* TODO: Rename when Nintendo implements this. */ }; class ShellService final : public IServiceObject { @@ -60,6 +61,7 @@ class ShellService final : public IServiceObject { Result GetApplicationProcessId(Out pid); Result BoostSystemMemoryResourceLimit(u64 sysmem_size); Result BoostSystemThreadsResourceLimit(); + Result GetUnimplementedEventHandle(Out event); public: DEFINE_SERVICE_DISPATCH_TABLE { /* 1.0.0-4.0.0 */ @@ -88,5 +90,8 @@ class ShellService final : public IServiceObject { /* 7.0.0-* */ MakeServiceCommandMeta(), + + /* 8.0.0-* */ + MakeServiceCommandMeta(), }; };