]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
build: minor adjustments
[xonotic/darkplaces.git] / sys_shared.c
index 751797540951117a6b8cfdc73659da1ecab1c324..4222c42be414c88836cdfe48a87c73993482b554 100644 (file)
 #include "taskqueue.h"
 #include "thread.h"
 #include "libcurl.h"
-#if defined(_MSC_VER)
-       // Not sure why MS compiler needs this here and gcc doesn't...
-       // and gcc fails to build darkplaces-dedicated if it's included here.
-       #include "SDL.h"
-#endif
 
 
 sys_t sys;
@@ -1092,7 +1087,11 @@ static void Sys_InitSignals(void)
 #endif
 }
 
-int main (int argc, char **argv)
+/** main() but renamed so we can wrap it in sys_sdl.c and sys_null.c
+ * to avoid needing to include SDL.h in this file (would make the dedicated server require SDL).
+ * SDL builds need SDL.h in the file where main() is defined because SDL renames and wraps main().
+ */
+int Sys_Main(int argc, char *argv[])
 {
        sys.argc = argc;
        sys.argv = (const char **)argv;