File diff r6936:6f0a52e3732c → r6937:bea726150bf3
src/video/dedicated_v.cpp
Show inline comments
 
@@ -5,25 +5,25 @@
 
#ifdef ENABLE_NETWORK
 

	
 
#include "../openttd.h"
 
#include "../debug.h"
 
#include "../functions.h"
 
#include "../gfx.h"
 
#include "../network/network.h"
 
#include "../window.h"
 
#include "../console.h"
 
#include "../variables.h"
 
#include "../genworld.h"
 
#include "../fileio.h"
 
#include "../blitter/blitter.hpp"
 
#include "../blitter/factory.hpp"
 
#include "dedicated_v.h"
 

	
 
#ifdef BEOS_NET_SERVER
 
#include <net/socket.h>
 
#endif
 

	
 
#ifdef __OS2__
 
#	include <sys/time.h> /* gettimeofday */
 
#	include <sys/types.h>
 
#	include <unistd.h>
 
#	include <conio.h>
 

	
 
@@ -119,26 +119,24 @@ static void *_dedicated_video_mem;
 
extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm, Subdirectory subdir);
 
extern void SwitchMode(int new_mode);
 

	
 

	
 
static const char *DedicatedVideoStart(const char * const *parm)
 
{
 
	int bpp = BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth();
 
	if (bpp == 0) _dedicated_video_mem = NULL;
 
	else          _dedicated_video_mem = malloc(_cur_resolution[0] * _cur_resolution[1] * (bpp / 8));
 

	
 
	_screen.width = _screen.pitch = _cur_resolution[0];
 
	_screen.height = _cur_resolution[1];
 
	_screen.renderer = RendererFactoryBase::SelectRenderer(BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
 
	if (_screen.renderer == NULL) error("Couldn't load the renderer '%s' the selected blitter depends on", BlitterFactoryBase::GetCurrentBlitter()->GetRenderer());
 

	
 
	SetDebugString("net=6");
 

	
 
#ifdef WIN32
 
	// For win32 we need to allocate a console (debug mode does the same)
 
	CreateConsole();
 
	CreateWindowsConsoleThread();
 
	SetConsoleTitle(_T("OpenTTD Dedicated Server"));
 
#endif
 

	
 
#ifdef __OS2__
 
	// For OS/2 we also need to switch to console mode instead of PM mode