From 6931560c8e057256177c91b4f95d2a47ae9d8b63 Mon Sep 17 00:00:00 2001 From: cathery Date: Wed, 15 Apr 2020 13:53:59 +0300 Subject: [PATCH] use setsys instead of ams::hos::SetVersionForLibnx() --- source/Sysmodule/source/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/Sysmodule/source/main.cpp b/source/Sysmodule/source/main.cpp index 2a5c975..e2efd57 100644 --- a/source/Sysmodule/source/main.cpp +++ b/source/Sysmodule/source/main.cpp @@ -47,12 +47,18 @@ namespace ams extern "C" void __appInit(void) { - ams::hos::SetVersionForLibnx(); ams::sm::DoWithSession([] { + //Initialize system firmware version + R_ABORT_UNLESS(setsysInitialize()); + SetSysFirmwareVersion fw; + R_ABORT_UNLESS(setsysGetFirmwareVersion(&fw)); + hosversionSet(MAKEHOSVERSION(fw.major, fw.minor, fw.micro)); + setsysExit(); + R_ABORT_UNLESS(timeInitialize()); R_ABORT_UNLESS(hiddbgInitialize()); - if (ams::hos::GetVersion() >= ams::hos::Version_700) + if (hosversionAtLeast(7,0,0)) R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer()); R_ABORT_UNLESS(usbHsInitialize()); //R_ABORT_UNLESS(pscmInitialize());