From 8d297f065ad67de8c0986ae33ff5e4520e90d4e4 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 3 Oct 2010 18:38:38 +0000 Subject: AGI: Properly detect the autosave slot in the save dialog Forward-ported from branch. Let's do this the easy way for now, even if I'm not sure why the save dialog shows the autosave slot anyway. svn-id: r52997 --- engines/agi/saveload.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index 386a6b1135..1a968816d4 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -809,12 +809,11 @@ int AgiEngine::saveGameDialog() { printText("Select a slot in which you wish to\nsave the game:", 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR); slot = selectSlot(); - if (slot == 0) + if (slot + _firstSlot == 0) messageBox("That slot is for Autosave only."); else if (slot < 0) return errOK; - } - while (slot == 0); + } while (slot + _firstSlot == 0); drawWindow(hp, vp + 5 * CHAR_LINES, GFX_WIDTH - hp, GFX_HEIGHT - vp - 9 * CHAR_LINES); -- cgit v1.2.3