mirror of
https://github.com/azahar-emu/ArticSetupTool
synced 2025-11-06 23:20:00 +01:00
Prevent use with Artic Base and print otp path
This commit is contained in:
parent
808b47644e
commit
8be59138f4
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
||||
VERSION_MAJOR := 1
|
||||
VERSION_MINOR := 0
|
||||
VERSION_REVISION := 0
|
||||
VERSION_REVISION := 1
|
||||
|
||||
all:
|
||||
mkdir -p plugin/build
|
||||
|
||||
@ -26,7 +26,7 @@ LIBRARIES := ctru
|
||||
|
||||
VERSION_MAJOR := 1
|
||||
VERSION_MINOR := 0
|
||||
VERSION_MICRO := 0
|
||||
VERSION_MICRO := 1
|
||||
|
||||
BUILD_FLAGS := -march=armv6k -mtune=mpcore -mfloat-abi=hard
|
||||
BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \
|
||||
|
||||
@ -16,7 +16,7 @@ SOURCES := ArticProtocol/sources sources sources/CTRPluginFramework
|
||||
|
||||
VERSION_MAJOR := 1
|
||||
VERSION_MINOR := 0
|
||||
VERSION_REVISION := 0
|
||||
VERSION_REVISION := 1
|
||||
SERVER_PORT := 5543
|
||||
|
||||
IP := 19
|
||||
|
||||
@ -29,6 +29,7 @@ namespace ArticFunctions {
|
||||
std::map<u64, HandleType> openHandles;
|
||||
CTRPluginFramework::Mutex amMutex;
|
||||
CTRPluginFramework::Mutex cfgMutex;
|
||||
bool isAzaharCalled = false;
|
||||
|
||||
void Process_GetTitleID(ArticProtocolServer::MethodInterface& mi) {
|
||||
bool good = true;
|
||||
@ -98,6 +99,12 @@ namespace ArticFunctions {
|
||||
if (good) good = mi.FinishInputParameters();
|
||||
if (!good) return;
|
||||
|
||||
if (!isAzaharCalled) {
|
||||
logger.Error("This tool cannot be used with the\n \"Connect to Artic Base\" option.\n Use \"Set Up System Files\" option.");
|
||||
mi.FinishGood(-1);
|
||||
return;
|
||||
}
|
||||
|
||||
s64 out;
|
||||
if (R_FAILED(svcGetProcessInfo(&out, CUR_PROCESS_HANDLE, 0x10005))) {
|
||||
mi.FinishInternalError();
|
||||
@ -525,6 +532,7 @@ namespace ArticFunctions {
|
||||
return;
|
||||
}
|
||||
reinterpret_cast<u32*>(ret_buf->data)[0] = INITIAL_SETUP_APP_VERSION;
|
||||
isAzaharCalled = true;
|
||||
|
||||
mi.FinishGood(0);
|
||||
}
|
||||
@ -628,6 +636,7 @@ namespace ArticFunctions {
|
||||
res = FSUSER_OpenFileDirectly(&file, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""), fsMakePath(PATH_ASCII, filePath), FS_OPEN_READ, 0);
|
||||
if (R_FAILED(res)) {
|
||||
logger.Error("Missing OTP backup on SD card, please update your luma version and/or remove the console battery.");
|
||||
logger.Error(filePath);
|
||||
mi.FinishGood(res);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user