]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_sdl.c
Fix pure data entities being linked into the area grid, causing performance hit
[xonotic/darkplaces.git] / sys_sdl.c
index d3564bac89fb0a76a699f9da6ddd092ef9b213ed..b4698fb2440fef08bed06e4ae6718a2fb772227d 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
 
 #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"
 
@@ -65,10 +60,10 @@ void Sys_Error (const char *error, ...)
        dpvsnprintf (string, sizeof (string), error, argptr);
        va_end (argptr);
 
-       Con_Printf ("Quake Error: %s\n", string);
+       Con_Errorf ("Engine Error: %s\n", string);
 
 #ifdef WIN32
-       MessageBox(NULL, string, "Quake Error", MB_OK | MB_SETFOREGROUND | MB_ICONSTOP);
+       MessageBox(NULL, string, "Engine Error", MB_OK | MB_SETFOREGROUND | MB_ICONSTOP);
 #endif
 
        Host_Shutdown ();
@@ -173,7 +168,6 @@ char *Sys_ConsoleInput(void)
 
 char *Sys_GetClipboardData (void)
 {
-#if SDL_MAJOR_VERSION != 1
        char *data = NULL;
        char *cliptext;
 
@@ -187,31 +181,6 @@ char *Sys_GetClipboardData (void)
        }
 
        return data;
-#elif defined(WIN32)
-       char *data = NULL;
-       char *cliptext;
-
-       if (OpenClipboard (NULL) != 0)
-       {
-               HANDLE hClipboardData;
-
-               if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0)
-               {
-                       if ((cliptext = (char *)GlobalLock (hClipboardData)) != 0)
-                       {
-                               size_t allocsize;
-                               allocsize = GlobalSize (hClipboardData) + 1;
-                               data = (char *)Z_Malloc (allocsize);
-                               strlcpy (data, cliptext, allocsize);
-                               GlobalUnlock (hClipboardData);
-                       }
-               }
-               CloseClipboard ();
-       }
-       return data;
-#else
-       return NULL;
-#endif
 }
 
 void Sys_InitConsole (void)