Working stuff! :) Last steps -> Add error checking.

This commit is contained in:
VoltZ
2019-11-02 02:01:53 +01:00
committed by GitHub
parent da49c38c9f
commit 44c31c46d5
5 changed files with 223 additions and 51 deletions
+8 -2
View File
@@ -1,6 +1,6 @@
#include "utils/cia.h"
bool updatingSelf;
bool updatingSelf = false;
static Result CIA_LaunchTitle(u64 titleId, FS_MediaType mediaType) {
Result ret = 0;
@@ -74,6 +74,12 @@ Result installCia(const char * ciaPath)
AM_TitleEntry info;
Result ret = 0;
ret = amInit();
if (R_FAILED(ret)) {
printf("Error in:\namInit();\n");
return ret;
}
FS_MediaType media = MEDIATYPE_SD;
ret = openFile(&fileHandle, ciaPath, false);
@@ -131,6 +137,6 @@ Result installCia(const char * ciaPath)
if (R_FAILED(ret = CIA_LaunchTitle(info.titleID, MEDIATYPE_SD)))
return ret;
}
amExit();
return 0;
}