more shit

This commit is contained in:
Arisotura 2021-10-27 02:54:23 +02:00
parent 81623e5b22
commit c9b36017b1
3 changed files with 6 additions and 7 deletions

View File

@ -289,7 +289,7 @@ void FATStorage::SaveIndex()
} }
bool FATStorage::ExportFile(std::string path, std::string out, fs::file_time_type& modtime) bool FATStorage::ExportFile(std::string path, std::string out)
{ {
FF_FIL file; FF_FIL file;
FILE* fout; FILE* fout;
@ -334,8 +334,6 @@ bool FATStorage::ExportFile(std::string path, std::string out, fs::file_time_typ
fclose(fout); fclose(fout);
f_close(&file); f_close(&file);
modtime = fs::last_write_time(out);
return true; return true;
} }
@ -407,9 +405,10 @@ void FATStorage::ExportDirectory(std::string path, std::string outbase, int leve
if (doexport) if (doexport)
{ {
fs::file_time_type modtime; std::string outpath = outbase+"/"+fullpath;
if (ExportFile("0:/"+fullpath, outbase+"/"+fullpath, modtime)) if (ExportFile("0:/"+fullpath, outpath))
{ {
fs::file_time_type modtime = fs::last_write_time(outpath);
s64 modtime_raw = std::chrono::duration_cast<std::chrono::seconds>(modtime.time_since_epoch()).count(); s64 modtime_raw = std::chrono::duration_cast<std::chrono::seconds>(modtime.time_since_epoch()).count();
FileIndexEntry& entry = FileIndex[fullpath]; FileIndexEntry& entry = FileIndex[fullpath];

View File

@ -60,7 +60,7 @@ private:
void LoadIndex(); void LoadIndex();
void SaveIndex(); void SaveIndex();
bool ExportFile(std::string path, std::string out, std::filesystem::file_time_type& modtime); bool ExportFile(std::string path, std::string out);
void ExportDirectory(std::string path, std::string outbase, int level); void ExportDirectory(std::string path, std::string outbase, int level);
bool DeleteHostDirectory(std::string path, std::string outbase, int level); bool DeleteHostDirectory(std::string path, std::string outbase, int level);
void ExportChanges(std::string outbase); void ExportChanges(std::string outbase);

View File

@ -1167,7 +1167,7 @@ CartHomebrew::CartHomebrew(u8* rom, u32 len, u32 chipid) : CartCommon(rom, len,
//if (Config::DLDIEnable) //if (Config::DLDIEnable)
if (true) if (true)
{ {
ApplyDLDIPatch(melonDLDI, sizeof(melonDLDI), true); ApplyDLDIPatch(melonDLDI, sizeof(melonDLDI), false);
SD = new FATStorage("melonDLDI.bin", 0, false, "dldi"); SD = new FATStorage("melonDLDI.bin", 0, false, "dldi");
SD->Open(); SD->Open();
} }