git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12228
d7cf8633-e32d-0410-b094-
e92efae38249
char *Sys_GetClipboardData (void)
{
-#ifdef WIN32
+#if SDL_MAJOR_VERSION != 1
+ char *data = NULL;
+ char *cliptext;
+
+ cliptext = SDL_GetClipboardText();
+ if (cliptext != NULL) {
+ size_t allocsize;
+ allocsize = strlen(cliptext) + 1;
+ data = (char *)Z_Malloc (allocsize);
+ strlcpy (data, cliptext, allocsize);
+ SDL_free(cliptext);
+ }
+
+ return data;
+#elif defined(WIN32)
char *data = NULL;
char *cliptext;