diff srogue/save.c @ 38:8a9525231fb6

Prevent changing name or savefile when SAVEDIR is used.
author elwin
date Sat, 27 Nov 2010 16:22:30 +0000
parents 34d7a614855e
children 3aa87373c908
line wrap: on
line diff
--- a/srogue/save.c	Thu Nov 25 17:28:29 2010 +0000
+++ b/srogue/save.c	Sat Nov 27 16:22:30 2010 +0000
@@ -58,7 +58,10 @@
 
 	mpos = 0;
 	if (file_name[0] != '\0') {
-		msg("Save file (%s)? ", file_name);
+		if (use_savedir)
+			msg("Save game? (y/n) ");
+		else
+			msg("Save file (%s)? ", file_name);
 		do {
 			c = wgetch(cw);
 			if(c == ESCAPE) {
@@ -70,6 +73,10 @@
 		if (c == 'y')
 			goto gotfile;
 	}
+	if (use_savedir) {
+		msg("");
+		return FALSE;
+	}
 	msg("File name: ");
 	mpos = 0;
 	buf[0] = '\0';