7 * Include this BEFORE darkplaces.h because it breaks wrapping
8 * _Static_assert. Cloudwalk has no idea how or why so don't ask.
12 #include "darkplaces.h"
16 #pragma comment(lib, "sdl2.lib")
17 #pragma comment(lib, "sdl2main.lib")
23 // =======================================================================
25 // =======================================================================
27 void Sys_SDL_Shutdown(void)
32 // Sys_Error early in startup might screw with automated
33 // workflows or something if we show the dialog by default.
34 static qbool nocrashdialog = true;
35 void Sys_SDL_Dialog(const char *title, const char *string)
38 SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, string, NULL);
41 char *Sys_GetClipboardData (void)
46 cliptext = SDL_GetClipboardText();
47 if (cliptext != NULL) {
49 allocsize = min(MAX_INPUTLINE, strlen(cliptext) + 1);
50 data = (char *)Z_Malloc (allocsize);
51 strlcpy (data, cliptext, allocsize);
58 void Sys_SDL_Init(void)
60 // we don't know which systems we'll want to init, yet...
62 Sys_Error("SDL_Init failed: %s\n", SDL_GetError());
64 // COMMANDLINEOPTION: sdl: -nocrashdialog disables "Engine Error" crash dialog boxes
65 if(!Sys_CheckParm("-nocrashdialog"))
66 nocrashdialog = false;
69 qbool sys_supportsdlgetticks = true;
70 unsigned int Sys_SDL_GetTicks (void)
72 return SDL_GetTicks();
74 void Sys_SDL_Delay (unsigned int milliseconds)
76 SDL_Delay(milliseconds);