mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Check for import.db and title.db before attempting install
This commit is contained in:
parent
3aa9a1633a
commit
0af181ac6a
@ -2165,10 +2165,16 @@ u32 InstallGameFile(const char* path, bool to_emunand) {
|
||||
else if (!((tid64 >> 32) & 0x10))
|
||||
to_sd = true;
|
||||
|
||||
// does the title.db exist?
|
||||
if ((to_sd && !fvx_qsize(to_emunand ? "B:/dbs/title.db" : "A:/dbs/title.db")) ||
|
||||
(!to_sd && !fvx_qsize(to_emunand ? "4:/dbs/title.db" : "1:/dbs/title.db")))
|
||||
return 1;
|
||||
// does title.db & import.db exist?
|
||||
if (to_sd) {
|
||||
if (!fvx_qsize(to_emunand ? "B:/dbs/title.db" : "A:/dbs/title.db") ||
|
||||
!fvx_qsize(to_emunand ? "B:/dbs/import.db" : "A:/dbs/import.db"))
|
||||
return 1;
|
||||
} else {
|
||||
if (!fvx_qsize(to_emunand ? "4:/dbs/title.db" : "1:/dbs/title.db") ||
|
||||
!fvx_qsize(to_emunand ? "4:/dbs/import.db" : "1:/dbs/import.db"))
|
||||
return 1;
|
||||
}
|
||||
|
||||
// now we know the correct drive
|
||||
drv = to_emunand ? (to_sd ? "B:" : to_twl ? "5:" : "4:") :
|
||||
|
Loading…
x
Reference in New Issue
Block a user