Skip to content

Commit

Permalink
define "File doesn't exist" in OSCR.cpp/h
Browse files Browse the repository at this point in the history
  • Loading branch information
smesgr9000 committed May 11, 2024
1 parent ab03ab8 commit 74352c6
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 23 deletions.
6 changes: 3 additions & 3 deletions Cart_Reader/GB.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ void writeSRAM_GB() {
display_Update();

} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
} else {
print_Error(F("Cart has no SRAM"));
Expand Down Expand Up @@ -1744,7 +1744,7 @@ void writeSRAMFLASH_MBC6_GB() {
println_Msg(F("Save writing finished"));
display_Update();
} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -1818,7 +1818,7 @@ void writeEEPROM_MBC7_GB() {

// open file on sd card
if (!myFile.open(filePath, O_READ))
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));

myFile.read(sdBuffer, lastByte);
myFile.close();
Expand Down
8 changes: 4 additions & 4 deletions Cart_Reader/GBA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ void writeSRAM_GBA(boolean browseFile, uint32_t sramSize, uint32_t pos) {
display_Update();

} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -1199,7 +1199,7 @@ void writeFRAM_GBA(boolean browseFile, unsigned long framSize) {
display_Update();

} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -1621,7 +1621,7 @@ void writeFLASH_GBA(boolean browseFile, uint32_t flashSize, uint32_t pos, boolea

} else {
println_Msg(F("Error"));
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -1717,7 +1717,7 @@ void writeEeprom_GBA(word eepSize) {
display_Update();
} else {
println_Msg(F("Error"));
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down
2 changes: 1 addition & 1 deletion Cart_Reader/GPC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void writeRAM_GPC(void) {
println_Msg(F("RAM writing finished"));
display_Update();
} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down
1 change: 1 addition & 0 deletions Cart_Reader/OSCR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ constexpr char PROGMEM FSTRING_CURRENT_SETTINGS[] = "CURRENT SETTINGS";
constexpr char PROGMEM FSTRING_OSCR[] = "OSCR";
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_FILE_DOESNT_EXIST[] = "File doesn't exist";

// Cart
constexpr char PROGMEM FSTRING_READ_ROM[] = "Read ROM";
Expand Down
3 changes: 2 additions & 1 deletion Cart_Reader/OSCR.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ extern const char PROGMEM FSTRING_CURRENT_SETTINGS[];
// Messages
extern const char PROGMEM FSTRING_OSCR[];
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
extern const char PROGMEM FSTRING_READ_ROM[];
Expand Down
2 changes: 1 addition & 1 deletion Cart_Reader/PCE.ino
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ void write_tennokoe_bank_PCE(int bank_index) {
println_Msg(F("Finished"));

} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}

println_Msg(FS(FSTRING_EMPTY));
Expand Down
2 changes: 1 addition & 1 deletion Cart_Reader/SNES.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ void writeSRAM(boolean browseFile) {
display_Update();

} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down
10 changes: 5 additions & 5 deletions Cart_Reader/SUPRACAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void writeSRAM_Acan() {
display_Clear();

if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return;
}

Expand Down Expand Up @@ -260,7 +260,7 @@ static void verifySRAM_Acan() {
display_Update();

if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return;
}

Expand Down Expand Up @@ -328,7 +328,7 @@ static void verifyUM6650() {
display_Update();

if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return;
}

Expand Down Expand Up @@ -365,7 +365,7 @@ static void writeUM6650() {
display_Clear();

if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return;
}

Expand Down Expand Up @@ -400,7 +400,7 @@ static void flashCart_Acan() {
display_Clear();

if (!myFile.open(filePath, O_READ)) {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
return;
}

Expand Down
4 changes: 2 additions & 2 deletions Cart_Reader/SV.ino
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void writeSRAM_SV() {
println_Msg(F("SRAM writing finished"));
display_Update();
} else {
print_Error(F("File doesnt exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -577,7 +577,7 @@ void writeROM_SV(void) {
wait();

} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down
10 changes: 5 additions & 5 deletions Cart_Reader/WS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ static void verifySRAM_WS() {
print_Error(did_not_verify_STR);
}
} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -700,7 +700,7 @@ static void writeSRAM_WS() {
println_Msg(F("Writing finished"));
display_Update();
} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -808,7 +808,7 @@ static void verifyEEPROM_WS() {
print_Error(did_not_verify_STR);
}
} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -859,7 +859,7 @@ static void writeEEPROM_WS() {

print_STR(done_STR, 1);
} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down Expand Up @@ -948,7 +948,7 @@ static void writeWitchOS_WS() {

print_STR(done_STR, 1);
} else {
print_Error(F("File doesn't exist"));
print_Error(FS(FSTRING_FILE_DOESNT_EXIST));
}
}

Expand Down

0 comments on commit 74352c6

Please sign in to comment.