#endif
va_start (argptr,error);
- vsnprintf (string, sizeof (string), error, argptr);
+ dpvsnprintf (string, sizeof (string), error, argptr);
va_end (argptr);
fprintf(stderr, "Error: %s\n", string);
+ Con_Print ("Quake Error: ");
+ Con_Print (string);
+ Con_Print ("\n");
+
Host_Shutdown ();
exit (1);
}
SDL_Delay(milliseconds);
}
-int SDL_main (int argc, char *argv[])
+char *Sys_GetClipboardData (void)
+{
+#ifdef WIN32
+ char *data = NULL;
+ char *cliptext;
+
+ if (OpenClipboard (NULL) != 0)
+ {
+ HANDLE hClipboardData;
+
+ if ((hClipboardData = GetClipboardData (CF_TEXT)) != 0)
+ {
+ if ((cliptext = GlobalLock (hClipboardData)) != 0)
+ {
+ data = malloc (GlobalSize(hClipboardData)+1);
+ strcpy (data, cliptext);
+ GlobalUnlock (hClipboardData);
+ }
+ }
+ CloseClipboard ();
+ }
+ return data;
+#else
+ return NULL;
+#endif
+}
+
+int main (int argc, char *argv[])
{
double frameoldtime, framenewtime;
signal(SIGFPE, SIG_IGN);
com_argc = argc;
- com_argv = argv;
+ com_argv = (const char **)argv;
#ifndef WIN32
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);