summaryrefslogtreecommitdiff
path: root/source/snapshot.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2008-12-05 00:37:26 +0000
committerIan C <ianc@noddybox.co.uk>2008-12-05 00:37:26 +0000
commit9ebec735c488e2f7ac29933fb51b4e6e65c7b93f (patch)
treec19015d71edcdf6dfba13d10115ebaa17a7c7fe7 /source/snapshot.c
parentf6a25a43ff98942dc051cfed6b28eefffeb8e40e (diff)
Initial working version of memory snapshots
Diffstat (limited to 'source/snapshot.c')
-rw-r--r--source/snapshot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/snapshot.c b/source/snapshot.c
index f5a8b9c..14f0e30 100644
--- a/source/snapshot.c
+++ b/source/snapshot.c
@@ -96,7 +96,7 @@ void SNAP_Save(Z80 *cpu)
return;
}
- if(!GUI_InputName(base, 8) || !base[0])
+ if(!GUI_InputName("enter snapshot filename", ".d81", base, 8) || !base[0])
{
return;
}
@@ -121,6 +121,10 @@ void SNAP_Save(Z80 *cpu)
ZX81SaveSnapshot(fp);
fclose(fp);
}
+ else
+ {
+ GUI_Alert(FALSE, "Failed to save snapshot");
+ }
}
void SNAP_Load(Z80 *cpu, const char *optional_name)
@@ -162,13 +166,9 @@ void SNAP_Load(Z80 *cpu, const char *optional_name)
}
else
{
- DS81_DEBUG("Loading SK snap");
SK_LoadSnapshot(fp);
- DS81_DEBUG("Loading Z80 snap");
Z80LoadSnapshot(cpu, fp);
- DS81_DEBUG("Loading ZX81 snap");
ZX81LoadSnapshot(fp);
- DS81_DEBUG("Snap loaded");
}
fclose(fp);