forked from Mirror/GodMode9
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))
|
else if (!((tid64 >> 32) & 0x10))
|
||||||
to_sd = true;
|
to_sd = true;
|
||||||
|
|
||||||
// does the title.db exist?
|
// does title.db & import.db exist?
|
||||||
if ((to_sd && !fvx_qsize(to_emunand ? "B:/dbs/title.db" : "A:/dbs/title.db")) ||
|
if (to_sd) {
|
||||||
(!to_sd && !fvx_qsize(to_emunand ? "4:/dbs/title.db" : "1:/dbs/title.db")))
|
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;
|
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
|
// now we know the correct drive
|
||||||
drv = to_emunand ? (to_sd ? "B:" : to_twl ? "5:" : "4:") :
|
drv = to_emunand ? (to_sd ? "B:" : to_twl ? "5:" : "4:") :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user