some other fixes including MSVC patch of s_delay(int ms)

origin
stpohle 23 years ago
parent ef74f4b176
commit dd8bf60bd0

@ -1,4 +1,4 @@
/* $Id: menu.c,v 1.14 2003/05/07 18:57:22 stpohle Exp $ */
/* $Id: menu.c,v 1.15 2003/05/07 20:19:19 stpohle Exp $ */
/* menu's for the game */
#include <SDL.h>
@ -172,7 +172,7 @@ menu_loop (char *menutitle, _menu menu[], int lastselect)
ds = 0;
SDL_Flip (gfx.screen);
}
s_delay (50);
s_delay (25);
};
return menuselect;
};

@ -359,7 +359,7 @@ wait_for_players ()
else if (event.type == SDL_KEYDOWN)
keypressed = 1;
s_delay (50);
s_delay (25);
}
mw_shutdown ();

@ -1,4 +1,4 @@
/* $Id: sysfunc.c,v 1.10 2003/05/07 18:52:57 stpohle Exp $
/* $Id: sysfunc.c,v 1.11 2003/05/07 20:19:20 stpohle Exp $
sysfunc.c - this file hold some routines for the system functions..
like d_delay
*/
@ -12,13 +12,17 @@ s_delay (int ms)
fd_set selectset;
struct timeval tval;
#ifndef _WIN32
if (ms < 20) {
#endif
FD_ZERO (&selectset);
tval.tv_sec = 0;
tval.tv_usec = ms * 1000;
select (1, &selectset, NULL, NULL, &tval);
#ifndef _WIN32
}
else usleep (1000 * ms);
#endif
};
int

Loading…
Cancel
Save