From 9ebec735c488e2f7ac29933fb51b4e6e65c7b93f Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 5 Dec 2008 00:37:26 +0000 Subject: Initial working version of memory snapshots --- source/snapshot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/snapshot.c') 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); -- cgit v1.2.3