Stop unnecessarily creating eeprom file
This commit is contained in:
@@ -59,6 +59,7 @@ FORCE_INLINE size_t getSaveSize(SaveType saveType) {
|
||||
}
|
||||
|
||||
void PIF::LoadEeprom(SaveType saveType, fs::path path) {
|
||||
if(saveType == SAVE_EEPROM_16k || saveType == SAVE_EEPROM_4k) {
|
||||
if (eeprom)
|
||||
free(eeprom);
|
||||
|
||||
@@ -83,6 +84,7 @@ void PIF::LoadEeprom(SaveType saveType, fs::path path) {
|
||||
fread(eeprom, 1, eepromSize, f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
PIF::~PIF() {
|
||||
FILE* f = fopen(mempakPath.c_str(), "wb");
|
||||
|
||||
Reference in New Issue
Block a user