X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=sys_unix.c;fp=sys_unix.c;h=49990f1f377a5ebf20af3e15c7a424bbc1c2aa8a;hb=bfbabeee8f8ae8c5f35a147be7ab6ca31960b0e8;hp=2ff100da32ab779cd5cdeee98ad20601993f1922;hpb=d217d6b9ba9012bc374ac0d44d48422b7b13b755;p=xonotic%2Fdarkplaces.git diff --git a/sys_unix.c b/sys_unix.c index 2ff100da..49990f1f 100644 --- a/sys_unix.c +++ b/sys_unix.c @@ -10,8 +10,6 @@ #include #endif -#include - #include "darkplaces.h" sys_t sys; @@ -138,34 +136,8 @@ char *Sys_GetClipboardData (void) return NULL; } -int main (int argc, char **argv) +void Sys_SDL_Init(void) { - signal(SIGFPE, SIG_IGN); - sys.selffd = -1; - sys.argc = argc; - sys.argv = (const char **)argv; - Sys_ProvideSelfFD(); - - // COMMANDLINEOPTION: sdl: -noterminal disables console output on stdout - if(Sys_CheckParm("-noterminal")) - sys.outfd = -1; - // COMMANDLINEOPTION: sdl: -stderr moves console output to stderr - else if(Sys_CheckParm("-stderr")) - sys.outfd = 2; - else - sys.outfd = 1; -#ifndef WIN32 - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); -#endif - - // used by everything - Memory_Init(); - - Host_Main(); - - Sys_Quit(0); - - return 0; } qbool sys_supportsdlgetticks = false;