diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 11:58:50 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:34 +0000 |
commit | ac3e5586cd56657ff1b6f5f64af7e1d7c76b410d (patch) | |
tree | b245f2cbd4e7491b948aea5c7c080be61307c950 /src/sys/sys_unix.c | |
parent | dc3819f1e99d8159bdb0ea1da26506b00fe78e62 (diff) |
* Merge ioq3-r1458
Diffstat (limited to 'src/sys/sys_unix.c')
-rw-r--r-- | src/sys/sys_unix.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/sys/sys_unix.c b/src/sys/sys_unix.c index 090e9e43..760b6022 100644 --- a/src/sys/sys_unix.c +++ b/src/sys/sys_unix.c @@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/qcommon.h" #include "sys_local.h" +#include <signal.h> #include <sys/types.h> #include <sys/stat.h> #include <errno.h> @@ -463,6 +464,9 @@ void Sys_Sleep( int msec ) { fd_set fdset; + if( msec == 0 ) + return; + FD_ZERO(&fdset); FD_SET(fileno(stdin), &fdset); if( msec < 0 ) @@ -508,3 +512,31 @@ void Sys_ErrorDialog( const char *error ) FS_FCloseFile( f ); } + +/* +============== +Sys_GLimpInit + +Unix specific GL implementation initialisation +============== +*/ +void Sys_GLimpInit( void ) +{ + // NOP +} + +/* +============== +Sys_PlatformInit + +Unix specific initialisation +============== +*/ +void Sys_PlatformInit( void ) +{ + signal( SIGHUP, Sys_SigHandler ); + signal( SIGQUIT, Sys_SigHandler ); + signal( SIGTRAP, Sys_SigHandler ); + signal( SIGIOT, Sys_SigHandler ); + signal( SIGBUS, Sys_SigHandler ); +} |