]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_sdl.c
physics: fix and refactor unsticking
[xonotic/darkplaces.git] / sys_sdl.c
index ce3d28cece51a03d9756697f2d5d7e331a8b07cc..574f1355aacedb76cb10b57d497f29c910effe8b 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -1,8 +1,3 @@
-#ifdef WIN32
-#else
-#include <sys/time.h>
-#endif
-
 /*
  * Include this BEFORE darkplaces.h because it breaks wrapping
  * _Static_assert. Cloudwalk has no idea how or why so don't ask.
@@ -18,7 +13,6 @@
 #endif
 #endif
 
-sys_t sys;
 
 // =======================================================================
 // General routines
@@ -38,7 +32,7 @@ void Sys_SDL_Dialog(const char *title, const char *string)
                SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, string, NULL);
 }
 
-char *Sys_GetClipboardData (void)
+char *Sys_SDL_GetClipboardData (void)
 {
        char *data = NULL;
        char *cliptext;
@@ -48,7 +42,7 @@ char *Sys_GetClipboardData (void)
                size_t allocsize;
                allocsize = min(MAX_INPUTLINE, strlen(cliptext) + 1);
                data = (char *)Z_Malloc (allocsize);
-               strlcpy (data, cliptext, allocsize);
+               dp_strlcpy (data, cliptext, allocsize);
                SDL_free(cliptext);
        }
 
@@ -75,3 +69,8 @@ void Sys_SDL_Delay (unsigned int milliseconds)
 {
        SDL_Delay(milliseconds);
 }
+
+int main(int argc, char *argv[])
+{
+       return Sys_Main(argc, argv);
+}