Skip to content

Commit

Permalink
fix hosversion
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Sep 9, 2021
1 parent 9411a0a commit 7b985c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/source/noexs/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ void __libnx_initheap(void) {

void __appInit(void) {
Result rc;

if (hosversionGet() == 0) {
rc = setsysInitialize();
if (R_SUCCEEDED(rc)) {
SetSysFirmwareVersion fw;
rc = setsysGetFirmwareVersion(&fw);
if (R_SUCCEEDED(rc))
hosversionSet((BIT(31)) | (MAKEHOSVERSION(fw.major, fw.minor, fw.micro)));
setsysExit();
}
}

/* Initialize services */
rc = smInitialize();
if (R_FAILED(rc)) {
Expand Down

0 comments on commit 7b985c3

Please sign in to comment.