2010-04-22 21:49:26 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
#else
|
|
|
|
#define _XOPEN_SOURCE 500
|
|
|
|
#endif
|
|
|
|
|
2008-12-05 02:10:34 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include "joystick.h"
|
|
|
|
|
|
|
|
extern jmp_buf newmode_jmpbuf;
|
|
|
|
|
|
|
|
void wait(unsigned int ms) {
|
|
|
|
if (waitForFire) {
|
|
|
|
if (JOYISFIRE) {
|
|
|
|
longjmp(newmode_jmpbuf, 43);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
Sleep(ms);
|
|
|
|
#else
|
|
|
|
usleep(ms*1000);
|
|
|
|
#endif
|
|
|
|
}
|