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) {
|
void PIF::LoadEeprom(SaveType saveType, fs::path path) {
|
||||||
|
if(saveType == SAVE_EEPROM_16k || saveType == SAVE_EEPROM_4k) {
|
||||||
if (eeprom)
|
if (eeprom)
|
||||||
free(eeprom);
|
free(eeprom);
|
||||||
|
|
||||||
@@ -83,6 +84,7 @@ void PIF::LoadEeprom(SaveType saveType, fs::path path) {
|
|||||||
fread(eeprom, 1, eepromSize, f);
|
fread(eeprom, 1, eepromSize, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PIF::~PIF() {
|
PIF::~PIF() {
|
||||||
FILE* f = fopen(mempakPath.c_str(), "wb");
|
FILE* f = fopen(mempakPath.c_str(), "wb");
|
||||||
|
|||||||
Reference in New Issue
Block a user