Subversion Repositories Kolibri OS

Rev

Rev 5131 | Rev 8663 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5131 Rev 8520
Line 9... Line 9...
9
#include 
9
#include 
10
#include 
10
#include 
11
#include 
11
#include 
12
#include 
12
#include 
13
#include 
13
#include 
-
 
14
#include 
14
#if !defined(__WIN32__) && !defined(_KOLIBRI)
15
#if !defined(__WIN32__) && !defined(_KOLIBRI)
15
#include 
16
#include 
16
#include 
17
#include 
17
#include 
18
#include 
18
#include 
19
#include 
Line 44... Line 45...
44
	char		text[1024];
45
	char		text[1024];
Line 45... Line 46...
45
	
46
	
46
	va_start (argptr,fmt);
47
	va_start (argptr,fmt);
47
	vsprintf (text,fmt,argptr);
48
	vsprintf (text,fmt,argptr);
48
	va_end (argptr);
-
 
49
#ifdef _KOLIBRI
-
 
50
	__menuet__debug_out(text);
49
	va_end (argptr);
51
#else
50
 
52
	fprintf(stderr, "%s", text);
-
 
Line 53... Line 51...
53
#endif
51
	fprintf(stderr, "%s", text);
54
	
52
	
Line 55... Line 53...
55
	//Con_Print (text);
53
	//Con_Print (text);
Line 100... Line 98...
100
    char        string[1024];
98
    char        string[1024];
Line 101... Line 99...
101
 
99
 
102
    va_start (argptr,error);
100
    va_start (argptr,error);
103
    vsprintf (string,error,argptr);
101
    vsprintf (string,error,argptr);
104
    va_end (argptr);
-
 
105
#ifdef _KOLIBRI
-
 
106
	__menuet__debug_out("Error: ");
-
 
107
	__menuet__debug_out(string);
-
 
108
	__menuet__debug_out("\n");
102
    va_end (argptr);
109
#else
103
 
110
	fprintf(stderr, "Error: %s\n", string);
-
 
Line 111... Line 104...
111
#endif
104
	fprintf(stderr, "Error: %s\n", string);
112
 
105
 
113
	Host_Shutdown ();
-
 
114
	exit (1);
106
	Host_Shutdown ();
Line 115... Line 107...
115
 
107
	exit (1);
116
} 
108
} 
117
 
109
 
118
void Sys_Warn (char *warning, ...)
110
void Sys_Warn (char *warning, ...)
Line 119... Line 111...
119
{ 
111
{ 
120
    va_list     argptr;
112
    va_list     argptr;
121
    char        string[1024];
113
    char        string[1024];
122
    
-
 
123
    va_start (argptr,warning);
-
 
124
    vsprintf (string,warning,argptr);
-
 
125
    va_end (argptr);
114
    
126
#ifdef _KOLIBRI
115
    va_start (argptr,warning);
127
	__menuet__debug_out("Warning: ");
-
 
128
	__menuet__debug_out(string);
116
    vsprintf (string,warning,argptr);
Line 129... Line 117...
129
#else
117
    va_end (argptr);
130
	fprintf(stderr, "Warning: %s", string);
118
 
Line 280... Line 268...
280
void Sys_mkdir (char *path)
268
void Sys_mkdir (char *path)
281
{
269
{
282
#ifdef __WIN32__
270
#ifdef __WIN32__
283
    mkdir (path);
271
    mkdir (path);
284
#else
272
#else
285
    mkdir (path, 0777);
273
    //mkdir (path, 0777);
286
#endif
274
#endif
287
}
275
}
Line 288... Line 276...
288
 
276
 
289
void Sys_DebugLog(char *file, char *fmt, ...)
277
void Sys_DebugLog(char *file, char *fmt, ...)
Line 374... Line 362...
374
}
362
}
Line 375... Line 363...
375
 
363
 
376
void Sys_Sleep(void)
364
void Sys_Sleep(void)
377
{
365
{
378
#ifdef _KOLIBRI
366
#ifdef _KOLIBRI
379
	__menuet__delay100(1);
367
	delay(1);
380
#else
368
#else
381
	SDL_Delay(1);
369
	SDL_Delay(1);
382
#endif
370
#endif
Line 435... Line 423...
435
        if (cls.state == ca_dedicated)
423
        if (cls.state == ca_dedicated)
436
        {   // play vcrfiles at max speed
424
        {   // play vcrfiles at max speed
437
            if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
425
            if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
438
            {
426
            {
439
#ifdef _KOLIBRI
427
#ifdef _KOLIBRI
440
                __menuet__delay100(1);
428
                delay(1);
441
#else
429
#else
442
                SDL_Delay (1);
430
                SDL_Delay (1);
443
#endif
431
#endif
444
                continue;       // not time to run a server only tic yet
432
                continue;       // not time to run a server only tic yet
445
            }
433
            }