summaryrefslogtreecommitdiff
path: root/source/main.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2021-07-05 21:37:37 +0000
committerIan C <ianc@noddybox.co.uk>2021-07-05 21:37:37 +0000
commit06f2daa56e0eb8e592c015b07dbeb787bb081e4d (patch)
tree59c9a9c05fff8e4aff8b7ad045dc739151a7a027 /source/main.c
parent0bc192bffbf28ba5733ae955916e5ebc72f3641f (diff)
Added TAP file loading.
Diffstat (limited to 'source/main.c')
-rw-r--r--source/main.c16
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();