mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-23 04:12:02 +00:00
sm: use enums for GetInfo
This commit is contained in:
parent
d986ffa153
commit
53d7281e66
2 changed files with 12 additions and 12 deletions
|
@ -54,15 +54,15 @@ void __libnx_exception_handler(ThreadExceptionDump *ctx) {
|
||||||
|
|
||||||
|
|
||||||
void __libnx_initheap(void) {
|
void __libnx_initheap(void) {
|
||||||
void* addr = nx_inner_heap;
|
void* addr = nx_inner_heap;
|
||||||
size_t size = nx_inner_heap_size;
|
size_t size = nx_inner_heap_size;
|
||||||
|
|
||||||
/* Newlib */
|
/* Newlib */
|
||||||
extern char* fake_heap_start;
|
extern char* fake_heap_start;
|
||||||
extern char* fake_heap_end;
|
extern char* fake_heap_end;
|
||||||
|
|
||||||
fake_heap_start = (char*)addr;
|
fake_heap_start = (char*)addr;
|
||||||
fake_heap_end = (char*)addr + size;
|
fake_heap_end = (char*)addr + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __appInit(void) {
|
void __appInit(void) {
|
||||||
|
@ -100,5 +100,5 @@ int main(int argc, char **argv)
|
||||||
s_server_manager.Process();
|
s_server_manager.Process();
|
||||||
|
|
||||||
/* Cleanup. */
|
/* Cleanup. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,12 +158,12 @@ namespace sts::sm {
|
||||||
InitialProcessIdLimits() {
|
InitialProcessIdLimits() {
|
||||||
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_500) {
|
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_500) {
|
||||||
/* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */
|
/* On 5.0.0+, we can get precise limits from svcGetSystemInfo. */
|
||||||
R_ASSERT(svcGetSystemInfo(&this->min, 2, 0, 0));
|
R_ASSERT(svcGetSystemInfo(&this->min, SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
||||||
R_ASSERT(svcGetSystemInfo(&this->max, 2, 0, 1));
|
R_ASSERT(svcGetSystemInfo(&this->max, SystemInfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
||||||
} else if (GetRuntimeFirmwareVersion() >= FirmwareVersion_400) {
|
} else if (GetRuntimeFirmwareVersion() >= FirmwareVersion_400) {
|
||||||
/* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */
|
/* On 4.0.0-4.1.0, we can get the precise limits from normal svcGetInfo. */
|
||||||
R_ASSERT(svcGetInfo(&this->min, 19, 0, 0));
|
R_ASSERT(svcGetInfo(&this->min, InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Minimum));
|
||||||
R_ASSERT(svcGetInfo(&this->max, 19, 0, 1));
|
R_ASSERT(svcGetInfo(&this->max, InfoType_InitialProcessIdRange, INVALID_HANDLE, InitialProcessIdRangeInfo_Maximum));
|
||||||
} else {
|
} else {
|
||||||
/* On < 4.0.0, we just use hardcoded extents. */
|
/* On < 4.0.0, we just use hardcoded extents. */
|
||||||
this->min = InitialProcessIdMin;
|
this->min = InitialProcessIdMin;
|
||||||
|
|
Loading…
Reference in a new issue