define "File doesn't exist" in OSCR.cpp/h

This commit is contained in:
smesgr9000 2024-05-11 23:32:06 +02:00
parent ab03ab879c
commit 74352c6e31
10 changed files with 25 additions and 23 deletions

View File

@ -1458,7 +1458,7 @@ void writeSRAM_GB() {
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} else { } else {
print_Error(F("Cart has no SRAM")); print_Error(F("Cart has no SRAM"));
@ -1744,7 +1744,7 @@ void writeSRAMFLASH_MBC6_GB() {
println_Msg(F("Save writing finished")); println_Msg(F("Save writing finished"));
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -1818,7 +1818,7 @@ void writeEEPROM_MBC7_GB() {
// open file on sd card // open file on sd card
if (!myFile.open(filePath, O_READ)) if (!myFile.open(filePath, O_READ))
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
myFile.read(sdBuffer, lastByte); myFile.read(sdBuffer, lastByte);
myFile.close(); myFile.close();

View File

@ -1012,7 +1012,7 @@ void writeSRAM_GBA(boolean browseFile, uint32_t sramSize, uint32_t pos) {
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -1199,7 +1199,7 @@ void writeFRAM_GBA(boolean browseFile, unsigned long framSize) {
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -1621,7 +1621,7 @@ void writeFLASH_GBA(boolean browseFile, uint32_t flashSize, uint32_t pos, boolea
} else { } else {
println_Msg(F("Error")); println_Msg(F("Error"));
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -1717,7 +1717,7 @@ void writeEeprom_GBA(word eepSize) {
display_Update(); display_Update();
} else { } else {
println_Msg(F("Error")); println_Msg(F("Error"));
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }

View File

@ -377,7 +377,7 @@ void writeRAM_GPC(void) {
println_Msg(F("RAM writing finished")); println_Msg(F("RAM writing finished"));
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }

View File

@ -62,6 +62,7 @@ constexpr char PROGMEM FSTRING_CURRENT_SETTINGS[] = "CURRENT SETTINGS";
constexpr char PROGMEM FSTRING_OSCR[] = "OSCR"; constexpr char PROGMEM FSTRING_OSCR[] = "OSCR";
constexpr char PROGMEM FSTRING_MODULE_NOT_ENABLED[] = "Module is not enabled."; constexpr char PROGMEM FSTRING_MODULE_NOT_ENABLED[] = "Module is not enabled.";
constexpr char PROGMEM FSTRING_DATABASE_FILE_NOT_FOUND[] = "Database file not found"; constexpr char PROGMEM FSTRING_DATABASE_FILE_NOT_FOUND[] = "Database file not found";
constexpr char PROGMEM FSTRING_FILE_DOESNT_EXIST[] = "File doesn't exist";
// Cart // Cart
constexpr char PROGMEM FSTRING_READ_ROM[] = "Read ROM"; constexpr char PROGMEM FSTRING_READ_ROM[] = "Read ROM";

View File

@ -41,7 +41,8 @@ extern const char PROGMEM FSTRING_CURRENT_SETTINGS[];
// Messages // Messages
extern const char PROGMEM FSTRING_OSCR[]; extern const char PROGMEM FSTRING_OSCR[];
extern const char PROGMEM FSTRING_MODULE_NOT_ENABLED[]; extern const char PROGMEM FSTRING_MODULE_NOT_ENABLED[];
extern const char FSTRING_DATABASE_FILE_NOT_FOUND[]; extern const char PROGMEM FSTRING_DATABASE_FILE_NOT_FOUND[];
extern const char PROGMEM FSTRING_FILE_DOESNT_EXIST[];
// Cart // Cart
extern const char PROGMEM FSTRING_READ_ROM[]; extern const char PROGMEM FSTRING_READ_ROM[];

View File

@ -725,7 +725,7 @@ void write_tennokoe_bank_PCE(int bank_index) {
println_Msg(F("Finished")); println_Msg(F("Finished"));
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
println_Msg(FS(FSTRING_EMPTY)); println_Msg(FS(FSTRING_EMPTY));

View File

@ -1648,7 +1648,7 @@ void writeSRAM(boolean browseFile) {
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }

View File

@ -232,7 +232,7 @@ static void writeSRAM_Acan() {
display_Clear(); display_Clear();
if (!myFile.open(filePath, O_READ)) { if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return; return;
} }
@ -260,7 +260,7 @@ static void verifySRAM_Acan() {
display_Update(); display_Update();
if (!myFile.open(filePath, O_READ)) { if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return; return;
} }
@ -328,7 +328,7 @@ static void verifyUM6650() {
display_Update(); display_Update();
if (!myFile.open(filePath, O_READ)) { if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return; return;
} }
@ -365,7 +365,7 @@ static void writeUM6650() {
display_Clear(); display_Clear();
if (!myFile.open(filePath, O_READ)) { if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return; return;
} }
@ -400,7 +400,7 @@ static void flashCart_Acan() {
display_Clear(); display_Clear();
if (!myFile.open(filePath, O_READ)) { if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return; return;
} }

View File

@ -373,7 +373,7 @@ void writeSRAM_SV() {
println_Msg(F("SRAM writing finished")); println_Msg(F("SRAM writing finished"));
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesnt exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -577,7 +577,7 @@ void writeROM_SV(void) {
wait(); wait();
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }

View File

@ -654,7 +654,7 @@ static void verifySRAM_WS() {
print_Error(did_not_verify_STR); print_Error(did_not_verify_STR);
} }
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -700,7 +700,7 @@ static void writeSRAM_WS() {
println_Msg(F("Writing finished")); println_Msg(F("Writing finished"));
display_Update(); display_Update();
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -808,7 +808,7 @@ static void verifyEEPROM_WS() {
print_Error(did_not_verify_STR); print_Error(did_not_verify_STR);
} }
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -859,7 +859,7 @@ static void writeEEPROM_WS() {
print_STR(done_STR, 1); print_STR(done_STR, 1);
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }
@ -948,7 +948,7 @@ static void writeWitchOS_WS() {
print_STR(done_STR, 1); print_STR(done_STR, 1);
} else { } else {
print_Error(F("File doesn't exist")); print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
} }
} }