Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8663 → Rev 9878

/contrib/other/sdlquake-1.0.9/sys_sdl.c
11,7 → 11,6
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <kos32sys.h>
#if !defined(__WIN32__) && !defined(_KOLIBRI)
#include <sys/ipc.h>
#include <sys/shm.h>
20,6 → 19,11
#include <sys/mman.h>
#endif
 
#ifdef _KOLIBRI
#include <sys/ksys.h>
#include <libgen.h>
#endif
 
#include "quakedef.h"
 
qboolean isDedicated;
270,7 → 274,7
#ifdef __WIN32__
mkdir (path);
#else
//mkdir (path, 0777);
mkdir (path, 0777);
#endif
}
 
293,11 → 297,11
#if defined(_KOLIBRI)
static int starttime = 0;
 
if ( ! starttime )
__asm__ __volatile__("int $0x40" : "=a"(starttime) : "a"(26), "b"(9));
if (!starttime) {
starttime = _ksys_get_tick_count();
}
 
int curtime;
__asm__ __volatile__("int $0x40" : "=a"(curtime) : "a"(26), "b"(9));
int curtime = _ksys_get_tick_count();
return (curtime-starttime)*0.01;
#elif defined(__WIN32__)
 
364,7 → 368,7
void Sys_Sleep(void)
{
#ifdef _KOLIBRI
delay(1);
_ksys_delay(1);
#else
SDL_Delay(1);
#endif
384,11 → 388,6
 
int main (int c, char **v)
{
#ifdef _KOLIBRI
#include "kolibri.h"
_ksys_setcwd(dirname(v[0]));
#endif
 
double time, oldtime, newtime;
quakeparms_t parms;
extern int vcrFile;
400,6 → 399,8
#ifndef _KOLIBRI
// signal(SIGFPE, floating_point_exception_handler);
signal(SIGFPE, SIG_IGN);
#else
basedir = dirname(v[0]);
#endif
 
parms.memsize = 8*1024*1024;
429,7 → 430,7
if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
{
#ifdef _KOLIBRI
delay(1);
_ksys_delay(1);
#else
SDL_Delay (1);
#endif