libstrat: namespace remaining non-namespaced code. more new-ipc updates

This commit is contained in:
Michael Scire
2019-10-19 17:42:53 -07:00
committed by SciresM
parent ae2fa2fa60
commit 0b22af1206
68 changed files with 1257 additions and 2118 deletions

View File

@@ -157,7 +157,7 @@ namespace sts::dmnt::cheat::impl {
/* Note: This function *MUST* be called only with the cheat lock held. */
os::ProcessId pid;
bool has_cheat_process = this->cheat_process_debug_handle != INVALID_HANDLE;
has_cheat_process &= R_SUCCEEDED(os::GetProcessId(&pid, this->cheat_process_debug_handle));
has_cheat_process &= R_SUCCEEDED(os::TryGetProcessId(&pid, this->cheat_process_debug_handle));
has_cheat_process &= R_SUCCEEDED(pm::dmnt::GetApplicationProcessId(&pid));
has_cheat_process &= (pid == this->cheat_process_metadata.process_id);

View File

@@ -43,8 +43,13 @@ extern "C" {
void __appExit(void);
}
/* Exception handling. */
sts::ncm::TitleId __stratosphere_title_id = sts::ncm::TitleId::Dmnt;
namespace sts::ams {
ncm::TitleId StratosphereTitleId = ncm::TitleId::Dmnt;
}
using namespace sts;
void __libnx_initheap(void) {
void* addr = nx_inner_heap;
@@ -58,12 +63,10 @@ void __libnx_initheap(void) {
fake_heap_end = (char*)addr + size;
}
using namespace sts;
void __appInit(void) {
hos::SetVersionForLibnx();
DoWithSmSession([&]() {
sm::DoWithSession([&]() {
R_ASSERT(pmdmntInitialize());
R_ASSERT(pminfoInitialize());
R_ASSERT(ldrDmntInitialize());
@@ -81,7 +84,7 @@ void __appInit(void) {
R_ASSERT(fsdevMountSdmc());
CheckAtmosphereVersion(CURRENT_ATMOSPHERE_VERSION);
ams::CheckApiVersion();
}
void __appExit(void) {

View File

@@ -36,7 +36,7 @@ namespace sts::dmnt {
Result DebugMonitorService::GetProcessId(sf::Out<os::ProcessId> out_pid, Handle hnd) {
/* Nintendo discards the output of this command, but we will return it. */
return svcGetProcessId(reinterpret_cast<u64 *>(out_pid.GetPointer()), hnd);
return os::TryGetProcessId(out_pid.GetPointer(), hnd);
}
Result DebugMonitorService::GetProcessHandle(sf::Out<Handle> out_hnd, os::ProcessId pid) {