(svn r21396) -Codechange: rename SafeSaveOrLoad to SaveLoad (it only did load), and add support for (safe) loading with a LoadFilter

This commit is contained in:
rubidium
2010-12-05 14:43:10 +00:00
parent 2a577707e7
commit c780091c26
3 changed files with 13 additions and 11 deletions

View File

@@ -137,7 +137,7 @@ static void *_dedicated_video_mem;
/* Whether a fork has been done. */
bool _dedicated_forks;
extern bool SafeSaveOrLoad(const char *filename, int mode, GameMode newgm, Subdirectory subdir);
extern bool SafeLoad(const char *filename, int mode, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf = NULL);
extern void SwitchToMode(SwitchMode new_mode);
static FVideoDriver_Dedicated iFVideoDriver_Dedicated;
@@ -279,7 +279,7 @@ void VideoDriver_Dedicated::MainLoop()
_switch_mode = SM_NONE;
/* First we need to test if the savegame can be loaded, else we will end up playing the
* intro game... */
if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL, BASE_DIR)) {
if (!SafeLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL, BASE_DIR)) {
/* Loading failed, pop out.. */
DEBUG(net, 0, "Loading requested map failed, aborting");
_networking = false;