diff options
author | Ian C <ianc@noddybox.co.uk> | 2021-07-05 21:37:37 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2021-07-05 21:37:37 +0000 |
commit | 06f2daa56e0eb8e592c015b07dbeb787bb081e4d (patch) | |
tree | 59c9a9c05fff8e4aff8b7ad045dc739151a7a027 /source/main.c | |
parent | 0bc192bffbf28ba5733ae955916e5ebc72f3641f (diff) |
Added TAP file loading.
Diffstat (limited to 'source/main.c')
-rw-r--r-- | source/main.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/main.c b/source/main.c index f096f9a..0610a6f 100644 --- a/source/main.c +++ b/source/main.c @@ -31,6 +31,7 @@ #include "spec.h" #include "config.h" #include "snapshot.h" +#include "snap.h" #ifndef DSSPEC_VERSION #define DSSPEC_VERSION "DEV " __TIME__ "/" __DATE__ @@ -61,7 +62,7 @@ static const char *main_menu[]= { "Reset Spectrum", - "Select Tape", + "Load TAP File", "Configure", "Map Joypad to Keys", "Save Memory Snapshot", @@ -76,7 +77,7 @@ static const char *main_menu[]= typedef enum { MenuReset, - MenuSelectTape, + MenuLoadTAP, MenuConfigure, MenuMapJoypad, MenuSaveSnapshot, @@ -299,8 +300,17 @@ int main(int argc, char *argv[]) SPECReset(z80); break; - case MenuSelectTape: + case MenuLoadTAP: + { + char file[FILENAME_MAX]; + + if (GUI_FileSelect(last_dir, file, ".TAP")) + { + TAPCloseTape(); + TAPOpenTape(file); + } break; + } case MenuConfigure: GUI_Config(); |