]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_sdl.c
Add darkplaces.rc to the vcxproj files for sdl, sdl2 and dedicated targets.
[xonotic/darkplaces.git] / sys_sdl.c
index cd769979c2753535a32c4b68d79707a25b5a9f4a..7bfb041f6c7345cf919d649cfbe3eb0a4b374bc3 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -1,9 +1,5 @@
 
 #ifdef WIN32
-#ifdef _MSC_VER
-#pragma comment(lib, "sdl.lib")
-#pragma comment(lib, "sdlmain.lib")
-#endif
 #include <io.h>
 #include "conio.h"
 #else
 
 #include <SDL.h>
 
+#ifdef WIN32
+#ifdef _MSC_VER
+#if SDL_MAJOR_VERSION == 1
+#pragma comment(lib, "sdl.lib")
+#pragma comment(lib, "sdlmain.lib")
+#else
+#pragma comment(lib, "sdl2.lib")
+#pragma comment(lib, "sdl2main.lib")
+#endif
+#endif
+#endif
+
 #include "quakedef.h"
 
 // =======================================================================
@@ -86,7 +94,7 @@ void Sys_PrintToTerminal(const char *text)
 #endif
                while(*text)
                {
-                       fs_offset_t written = (fs_offset_t)write(outfd, text, strlen(text));
+                       fs_offset_t written = (fs_offset_t)write(outfd, text, (int)strlen(text));
                        if(written <= 0)
                                break; // sorry, I cannot do anything about this error - without an output
                        text += written;