diff --git a/libs/video/targets/vid_sgl.c b/libs/video/targets/vid_sgl.c index 9d3f478c4..ead1dd319 100644 --- a/libs/video/targets/vid_sgl.c +++ b/libs/video/targets/vid_sgl.c @@ -77,7 +77,12 @@ extern void VID_Init8bitPalette (void); void VID_SDL_GammaCheck (void) { +#if SDL_VERSIONNUM(SDL_MAJOR_VERSION,SDL_MINOR_VERSION,SDL_PATCHLEVEL) \ + > SDL_VERSIONNUM(1,1,5) Uint16 redtable[256], greentable[256], bluetable[256]; +#else + Uint8 redtable[256], greentable[256], bluetable[256]; +#endif if (SDL_GetGammaRamp(redtable, greentable, bluetable) < 0) vid_gamma_avail = false; diff --git a/nq/source/sys_sdl.c b/nq/source/sys_sdl.c index 8d7e54430..0edf36823 100644 --- a/nq/source/sys_sdl.c +++ b/nq/source/sys_sdl.c @@ -38,8 +38,12 @@ #include #include #include -#include -#include +#ifdef HAVE_IO_H +# include +#endif +#ifdef HAVE_CONIO_H +# include +#endif #ifndef _WIN32 # include @@ -69,6 +73,7 @@ qboolean isDedicated = false; char *svs_info; int starttime; +int noconinput; #ifdef _WIN32 # include "winquake.h" @@ -185,8 +190,11 @@ Sys_Init_Cvars (void) Cvar_Set (sys_nostdout, "1"); } +#ifndef SDL_main +# define SDL_main main +#endif -C_LINKAGE int +int SDL_main (int c, char **v) { double time, oldtime, newtime; diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index f8d151bc4..f58e49376 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -38,8 +38,12 @@ #include #include #include -#include -#include +#ifdef HAVE_IO_H +# include +#endif +#ifdef HAVE_CONIO_H +# include +#endif #ifndef _WIN32 # include @@ -69,6 +73,7 @@ qboolean is_server = false; char *svs_info; int starttime; +int noconinput; #ifdef _WIN32 # include "winquake.h" @@ -185,8 +190,11 @@ Sys_Init_Cvars (void) Cvar_Set (sys_nostdout, "1"); } +#ifndef SDL_main +# define SDL_main main +#endif -C_LINKAGE int +int SDL_main (int c, char **v) { double time, oldtime, newtime;