summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2021-08-09 21:04:15 +0000
committerIan C <ianc@noddybox.co.uk>2021-08-09 21:04:15 +0000
commit8c16b55565a8a80defea7df192c23acf9ad89537 (patch)
tree867ae46e206a7131d66671c63205d1ffcb5e7472
parent37236919c76ed4b5a8a7c98950257e3626e268c4 (diff)
Altered snapshot to use last dir, rather than hardcoded.
-rw-r--r--include/config.h4
-rw-r--r--source/snapshot.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/include/config.h b/include/config.h
index 800960b..23342d9 100644
--- a/include/config.h
+++ b/include/config.h
@@ -21,10 +21,8 @@
#ifndef DSSPEC_CONFIG_H
#define DSSPEC_CONFIG_H
-/* Default snapshot dir
+/* Config items
*/
-#define DEFAULT_SNAPDIR "/SPECTRUM/"
-
typedef enum
{
DSSPEC_STICKY_SHIFT,
diff --git a/source/snapshot.c b/source/snapshot.c
index 61cffc2..2ef1c5d 100644
--- a/source/snapshot.c
+++ b/source/snapshot.c
@@ -105,7 +105,7 @@ void SNAP_Save(Z80 *cpu, SnapshotType type)
strcat(base, extension[type]);
- strcpy(file, DEFAULT_SNAPDIR);
+ strcpy(file, last_dir);
strcat(file, base);
fp = fopen(file, "wb");
@@ -147,7 +147,7 @@ void SNAP_Load(Z80 *cpu, const char *optional_name, SnapshotType type)
if (optional_name)
{
- strcpy(file, DEFAULT_SNAPDIR);
+ strcpy(file, last_dir);
strcat(file, optional_name);
strcat(file, extension[type]);