mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-06-02 18:01:09 +00:00
Port Sys_Sleep() to SDL
This commit is contained in:
parent
e7482b4957
commit
317e63887c
5 changed files with 10 additions and 33 deletions
|
@ -439,22 +439,6 @@ ID_TIME_T Sys_FileTimeStamp(FILE * fp) {
|
|||
return st.st_mtime;
|
||||
}
|
||||
|
||||
void Sys_Sleep(int msec) {
|
||||
if ( msec < 20 ) {
|
||||
static int last = 0;
|
||||
int now = Sys_Milliseconds();
|
||||
if ( now - last > 1000 ) {
|
||||
Sys_Printf("WARNING: Sys_Sleep - %d < 20 msec is not portable\n", msec);
|
||||
last = now;
|
||||
}
|
||||
// ignore that sleep call, keep going
|
||||
return;
|
||||
}
|
||||
// use nanosleep? keep sleeping if signal interrupt?
|
||||
if (usleep(msec * 1000) == -1)
|
||||
Sys_Printf("usleep: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
char *Sys_GetClipboardData(void) {
|
||||
Sys_Printf( "TODO: Sys_GetClipboardData\n" );
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue