mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Fix #720
This commit is contained in:
parent
c9b6a335f7
commit
4dc96d37e8
@ -55,7 +55,7 @@
|
|||||||
#define FTYPE_CIAINSTALL(tp) ((tp&(GAME_NCSD|GAME_NCCH|GAME_CIA|GAME_CDNTMD|GAME_TWLTMD)) || ((tp&GAME_NDS)&&(tp&(FLAG_DSIW))))
|
#define FTYPE_CIAINSTALL(tp) ((tp&(GAME_NCSD|GAME_NCCH|GAME_CIA|GAME_CDNTMD|GAME_TWLTMD)) || ((tp&GAME_NDS)&&(tp&(FLAG_DSIW))))
|
||||||
#define FTYPE_TIKINSTALL(tp) (tp&(GAME_TICKET))
|
#define FTYPE_TIKINSTALL(tp) (tp&(GAME_TICKET))
|
||||||
#define FTYPE_TIKDUMP(tp) (tp&(GAME_TIE))
|
#define FTYPE_TIKDUMP(tp) (tp&(GAME_TIE))
|
||||||
#define FTYPE_CXIDUMP(tp) (tp&(GAME_TMD))
|
#define FTYPE_CXIDUMP(tp) (tp&(GAME_TMD|GAME_TIE))
|
||||||
#define FTYPE_UNINSTALL(tp) (tp&(GAME_TIE))
|
#define FTYPE_UNINSTALL(tp) (tp&(GAME_TIE))
|
||||||
#define FTYPE_TIKBUILD(tp) (tp&(GAME_TICKET|SYS_TICKDB|BIN_TIKDB))
|
#define FTYPE_TIKBUILD(tp) (tp&(GAME_TICKET|SYS_TICKDB|BIN_TIKDB))
|
||||||
#define FTYPE_KEYBUILD(tp) (tp&(BIN_KEYDB|BIN_LEGKEY))
|
#define FTYPE_KEYBUILD(tp) (tp&(BIN_KEYDB|BIN_LEGKEY))
|
||||||
|
@ -1551,7 +1551,7 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, PaneData** pan
|
|||||||
}
|
}
|
||||||
DrawDirContents(current_dir, (*cursor = i), scroll);
|
DrawDirContents(current_dir, (*cursor = i), scroll);
|
||||||
if (((user_select != cxi_dump) && (BuildCiaFromGameFile(path, force_legit) == 0)) ||
|
if (((user_select != cxi_dump) && (BuildCiaFromGameFile(path, force_legit) == 0)) ||
|
||||||
((user_select == cxi_dump) && (DumpCxiSrlFromTmdFile(path) == 0))) n_success++;
|
((user_select == cxi_dump) && (DumpCxiSrlFromGameFile(path) == 0))) n_success++;
|
||||||
else { // on failure: show error, continue
|
else { // on failure: show error, continue
|
||||||
char lpathstr[32+1];
|
char lpathstr[32+1];
|
||||||
TruncateString(lpathstr, path, 32, 8);
|
TruncateString(lpathstr, path, 32, 8);
|
||||||
@ -1571,7 +1571,7 @@ u32 FileHandlerMenu(char* current_path, u32* cursor, u32* scroll, PaneData** pan
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (((user_select != cxi_dump) && (BuildCiaFromGameFile(file_path, force_legit) == 0)) ||
|
if (((user_select != cxi_dump) && (BuildCiaFromGameFile(file_path, force_legit) == 0)) ||
|
||||||
((user_select == cxi_dump) && (DumpCxiSrlFromTmdFile(file_path) == 0))) {
|
((user_select == cxi_dump) && (DumpCxiSrlFromGameFile(file_path) == 0))) {
|
||||||
ShowPrompt(false, "%s\n%s built to %s", pathstr, type, OUTPUT_PATH);
|
ShowPrompt(false, "%s\n%s built to %s", pathstr, type, OUTPUT_PATH);
|
||||||
if (in_output_path) GetDirContents(current_dir, current_path);
|
if (in_output_path) GetDirContents(current_dir, current_path);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3020,6 +3020,22 @@ u32 DumpCxiSrlFromTmdFile(const char* path) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 DumpCxiSrlFromGameFile(const char* path) {
|
||||||
|
u64 filetype = IdentifyFileType(path);
|
||||||
|
const char* path_tmd = path;
|
||||||
|
char path_data[256];
|
||||||
|
if (!(filetype & (GAME_TIE|GAME_TMD)))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (filetype & GAME_TIE) {
|
||||||
|
if (GetTieTmdPath(path_data, path) != 0)
|
||||||
|
return 1;
|
||||||
|
path_tmd = path_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DumpCxiSrlFromTmdFile(path_tmd);
|
||||||
|
}
|
||||||
|
|
||||||
u32 ExtractCodeFromCxiFile(const char* path, const char* path_out, char* extstr) {
|
u32 ExtractCodeFromCxiFile(const char* path, const char* path_out, char* extstr) {
|
||||||
u64 filetype = IdentifyFileType(path);
|
u64 filetype = IdentifyFileType(path);
|
||||||
char dest[256];
|
char dest[256];
|
||||||
|
@ -9,7 +9,7 @@ u32 BuildCiaFromGameFile(const char* path, bool force_legit);
|
|||||||
u32 InstallGameFile(const char* path, bool to_emunand);
|
u32 InstallGameFile(const char* path, bool to_emunand);
|
||||||
u32 InstallTicketFile(const char* path, bool to_emunand);
|
u32 InstallTicketFile(const char* path, bool to_emunand);
|
||||||
u32 DumpTicketForGameFile(const char* path, bool force_legit);
|
u32 DumpTicketForGameFile(const char* path, bool force_legit);
|
||||||
u32 DumpCxiSrlFromTmdFile(const char* path);
|
u32 DumpCxiSrlFromGameFile(const char* path);
|
||||||
u32 ExtractCodeFromCxiFile(const char* path, const char* path_out, char* extstr);
|
u32 ExtractCodeFromCxiFile(const char* path, const char* path_out, char* extstr);
|
||||||
u32 CompressCode(const char* path, const char* path_out);
|
u32 CompressCode(const char* path, const char* path_out);
|
||||||
u64 GetGameFileTrimmedSize(const char* path);
|
u64 GetGameFileTrimmedSize(const char* path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user