summaryrefslogtreecommitdiff
path: root/video/dedicated_v.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-25 16:33:58 +0000
committertron <tron@openttd.org>2005-07-25 16:33:58 +0000
commit030b4c2704975422230b4ae3a77ae9866163886b (patch)
tree072ce4845cd4bb6c73c44598de9516a00409e542 /video/dedicated_v.c
parent466e1c63e8c42a78a5399f854bc788a03d537a96 (diff)
downloadopenttd-030b4c2704975422230b4ae3a77ae9866163886b.tar.xz
(svn r2710) Simplify dedicated server code a bit and don't compile it at all, if network support ist disabled
Diffstat (limited to 'video/dedicated_v.c')
-rw-r--r--video/dedicated_v.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/video/dedicated_v.c b/video/dedicated_v.c
index 5396ad348..e0408c9bf 100644
--- a/video/dedicated_v.c
+++ b/video/dedicated_v.c
@@ -1,11 +1,10 @@
/* $Id$ */
#include "../stdafx.h"
-#include "../openttd.h"
-#include "dedicated_v.h"
#ifdef ENABLE_NETWORK
+#include "../openttd.h"
#include "../debug.h"
#include "../functions.h"
#include "../gfx.h"
@@ -14,6 +13,7 @@
#include "../command.h"
#include "../console.h"
#include "../variables.h"
+#include "dedicated_v.h"
#ifdef __OS2__
# include <sys/time.h> /* gettimeofday */
@@ -281,23 +281,6 @@ static int DedicatedVideoMainLoop(void)
}
}
-#else
-
-static const char *DedicatedVideoStart(const char * const *parm)
-{
- DEBUG(misc, 0) ("OpenTTD compiled without network support, exiting.");
-
- return NULL;
-}
-
-static void DedicatedVideoStop(void) {}
-static void DedicatedVideoMakeDirty(int left, int top, int width, int height) {}
-static bool DedicatedVideoChangeRes(int w, int h) { return false; }
-static void DedicatedVideoFullScreen(bool fs) {}
-static int DedicatedVideoMainLoop(void) { return ML_QUIT; }
-
-#endif /* ENABLE_NETWORK */
-
const HalVideoDriver _dedicated_video_driver = {
DedicatedVideoStart,
DedicatedVideoStop,
@@ -306,3 +289,5 @@ const HalVideoDriver _dedicated_video_driver = {
DedicatedVideoChangeRes,
DedicatedVideoFullScreen,
};
+
+#endif /* ENABLE_NETWORK */