strat: automatic program id detection

This commit is contained in:
Michael Scire
2021-10-01 17:18:50 -07:00
parent 9ecec1b935
commit 18825866ac
28 changed files with 88 additions and 129 deletions

View File

@@ -36,7 +36,7 @@ namespace ams::os {
}
IoRegion(size_t size, Handle handle, bool managed) {
this->Attach(size, handle, managed);
this->AttachHandle(size, handle, managed);
}
~IoRegion() {

View File

@@ -16,13 +16,17 @@
#pragma once
#include <stratosphere/os/os_managed_handle.hpp>
#include <stratosphere/ncm/ncm_program_id.hpp>
namespace ams::os {
::Handle GetCurrentProcessHandle();
NX_INLINE ProcessId GetCurrentProcessId() {
ALWAYS_INLINE ProcessId GetCurrentProcessId() {
return GetProcessId(GetCurrentProcessHandle());
}
/* TODO: Another header? */
ncm::ProgramId GetCurrentProgramId();
}