OpenTTD Source  12.0-beta2
dedicated_v.cpp File Reference
#include "../stdafx.h"
#include "../gfx_func.h"
#include "../network/network.h"
#include "../network/network_internal.h"
#include "../console_func.h"
#include "../genworld.h"
#include "../fileio_type.h"
#include "../fios.h"
#include "../blitter/factory.hpp"
#include "../company_func.h"
#include "../core/random_func.hpp"
#include "../saveload/saveload.h"
#include "../thread.h"
#include "../window_func.h"
#include "dedicated_v.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

bool SafeLoad (const std::string &filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf=nullptr)
 Load the specified savegame but on error do different things. More...
 
static bool InputWaiting ()
 
static void DedicatedHandleKeyInput ()
 

Variables

static void * _dedicated_video_mem
 
bool _dedicated_forks
 
static FVideoDriver_Dedicated iFVideoDriver_Dedicated
 

Detailed Description

Dedicated server video 'driver'.

Definition in file dedicated_v.cpp.

Function Documentation

◆ SafeLoad()

bool SafeLoad ( const std::string &  filename,
SaveLoadOperation  fop,
DetailedFileType  dft,
GameMode  newgm,
Subdirectory  subdir,
struct LoadFilter lf = nullptr 
)

Load the specified savegame but on error do different things.

If loading fails due to corrupt savegame, bad version, etc. go back to a previous correct state. In the menu for example load the intro game again.

Parameters
filenamefile to be loaded
fopmode of loading, always SLO_LOAD
newgmswitch to this mode of loading fails due to some unknown error
subdirdefault directory to look for filename, set to 0 if not needed
lfLoad filter to use, if nullptr: use filename + subdir.

Definition at line 933 of file openttd.cpp.

References DFT_GAME_FILE, DFT_OLD_GAME_FILE, and SLO_LOAD.