diff options
Diffstat (limited to 'Cart_Reader/GBA.ino')
-rw-r--r-- | Cart_Reader/GBA.ino | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/Cart_Reader/GBA.ino b/Cart_Reader/GBA.ino index 5b1054b..b010921 100644 --- a/Cart_Reader/GBA.ino +++ b/Cart_Reader/GBA.ino @@ -885,20 +885,7 @@ void getCartInfo_GBA() { // Check if string is a match
if (strcmp(tempStr, cartID) == 0) {
// Rewind to start of entry
- for (byte count_newline = 0; count_newline < 2; count_newline++) {
- while (1) {
- if (myFile.curPosition() == 0) {
- break;
- } else if (myFile.peek() == '\n') {
- myFile.seekCur(-1);
- break;
- } else {
- myFile.seekCur(-1);
- }
- }
- }
- if (myFile.curPosition() != 0)
- myFile.seekCur(2);
+ rewind_line(myFile);
// Display database
while (myFile.available()) {
@@ -975,20 +962,7 @@ void getCartInfo_GBA() { // Previous
else if (b == 2) {
- for (byte count_newline = 0; count_newline < 7; count_newline++) {
- while (1) {
- if (myFile.curPosition() == 0) {
- break;
- } else if (myFile.peek() == '\n') {
- myFile.seekCur(-1);
- break;
- } else {
- myFile.seekCur(-1);
- }
- }
- }
- if (myFile.curPosition() != 0)
- myFile.seekCur(2);
+ rewind_line(myFile, 6);
break;
}
|