Skip to content

Commit

Permalink
save and load games
Browse files Browse the repository at this point in the history
better menu
  • Loading branch information
xrip committed Oct 9, 2023
1 parent 424a92d commit c53283e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ const MenuItem menu_items[MENU_ITEMS_NUMBER] = {

void save() {
char pathname[255];
sprintf(pathname, "GB\\%s.save", "rom_filename");
sprintf(pathname, "GB\\%s.save", rom_filename);
FRESULT fr = f_mount(&fs, "", 1);
FIL fd;
fr = f_open(&fd, pathname, FA_CREATE_ALWAYS | FA_WRITE);
Expand All @@ -696,7 +696,7 @@ void save() {

void load() {
char pathname[255];
sprintf(pathname, "GB\\%s.save", "rom_filename");
sprintf(pathname, "GB\\%s.save", rom_filename);
FRESULT fr = f_mount(&fs, "", 1);
FIL fd;
fr = f_open(&fd, pathname, FA_READ);
Expand Down

0 comments on commit c53283e

Please sign in to comment.