Print an error to the console when saving a game fails

This commit is contained in:
Kp 2019-01-20 05:36:55 +00:00
parent 5d12f62d77
commit 0b319e2736

View file

@ -36,6 +36,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "object.h"
#include "gamemine.h"
#include "dxxerror.h"
#include "console.h"
#include "gamefont.h"
#include "gameseg.h"
#include "switch.h"
@ -956,6 +957,7 @@ int state_save_all_sub(const char *filename, const char *desc)
auto fp = PHYSFSX_openWriteBuffered(filename);
if ( !fp ) {
con_printf(CON_URGENT, "Failed to open %s: %s", filename, PHYSFS_getLastError());
nm_messagebox(NULL, 1, TXT_OK, "Error writing savegame.\nPossibly out of disk\nspace.");
return 0;
}