summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrunserv.sh1
-rw-r--r--src/main.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/runserv.sh b/runserv.sh
index 63ac1af2..b06ba81f 100755
--- a/runserv.sh
+++ b/runserv.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-export SDL_VIDEODRIVER=dummy
ulimit -c 100000000
while [ true ] ; do
src/tmwserv
diff --git a/src/main.cpp b/src/main.cpp
index 4f31f0c0..d1e26e04 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -130,6 +130,9 @@ void initialize()
gameHandler = new GameHandler();
connectionHandler = new ConnectionHandler();
+ // Make SDL use a dummy videodriver so that it doesn't require an X server
+ putenv("SDL_VIDEODRIVER=dummy");
+
// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) == -1) {
LOG_FATAL("SDL_Init: " << SDL_GetError(), 0)