mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
only set quicksaveslot upon successful load/save completion (#1085)
Fixes #1083
This commit is contained in:
parent
a2c40bbd2a
commit
411f934292
@ -2017,6 +2017,8 @@ static void G_DoSaveGame(void)
|
||||
savedescription[0] = 0;
|
||||
|
||||
if (name) free(name);
|
||||
|
||||
M_SetQuickSaveSlot(savegameslot);
|
||||
}
|
||||
|
||||
static void G_DoLoadGame(void)
|
||||
@ -2217,6 +2219,8 @@ static void G_DoLoadGame(void)
|
||||
fprintf(stderr, "G_DoLoadGame: Slot %d, %.8s (%s)\n",
|
||||
10*savepage+savegameslot, maplump, W_WadNameForLump(maplumpnum));
|
||||
}
|
||||
|
||||
M_SetQuickSaveSlot(savegameslot);
|
||||
}
|
||||
|
||||
boolean clean_screenshot;
|
||||
|
10
src/m_menu.c
10
src/m_menu.c
@ -89,7 +89,7 @@ int screenblocks; // has default
|
||||
|
||||
int screenSize; // temp for screenblocks (0-9)
|
||||
|
||||
int quickSaveSlot; // -1 = no quicksave slot picked!
|
||||
static int quickSaveSlot; // -1 = no quicksave slot picked!
|
||||
|
||||
int messageToPrint; // 1 = message to be printed
|
||||
|
||||
@ -938,10 +938,6 @@ void M_LoadSelect(int choice)
|
||||
M_ClearMenus ();
|
||||
if (name) free(name);
|
||||
|
||||
// [crispy] allow quickload before quicksave
|
||||
if (quickSaveSlot == -2)
|
||||
quickSaveSlot = choice;
|
||||
|
||||
// [crispy] save the last game you loaded
|
||||
SaveDef.lastOn = choice;
|
||||
}
|
||||
@ -1106,8 +1102,10 @@ void M_DoSave(int slot)
|
||||
{
|
||||
G_SaveGame (slot,savegamestrings[slot]);
|
||||
M_ClearMenus ();
|
||||
}
|
||||
|
||||
// PICK QUICKSAVE SLOT YET?
|
||||
void M_SetQuickSaveSlot (int slot)
|
||||
{
|
||||
if (quickSaveSlot == -2)
|
||||
quickSaveSlot = slot;
|
||||
}
|
||||
|
@ -188,6 +188,8 @@ typedef enum
|
||||
extern background_t menu_background;
|
||||
extern boolean M_MenuIsShaded(void);
|
||||
|
||||
extern void M_SetQuickSaveSlot (int slot);
|
||||
|
||||
#define MAX_MIDI_PLAYER_MENU_ITEMS 128
|
||||
extern void M_GetMidiDevices(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user