TIMER: Support 1ms timer resolution in Cygwin
This commit is contained in:
parent
8b181a360c
commit
a06ab20512
2 changed files with 9 additions and 1 deletions
5
makefile
5
makefile
|
@ -751,6 +751,11 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||||
endif
|
endif
|
||||||
ifeq (cygwin,$(OSTYPE))
|
ifeq (cygwin,$(OSTYPE))
|
||||||
LIBEXT = $(LIBEXTSAVE)
|
LIBEXT = $(LIBEXTSAVE)
|
||||||
|
LIBPATH += /usr/lib/w32api
|
||||||
|
ifneq (,$(call find_lib,winmm))
|
||||||
|
OS_CCDEFS += -DHAVE_WINMM
|
||||||
|
OS_LDFLAGS += -lwinmm
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS)))
|
ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS)))
|
||||||
$(info *** Info ***)
|
$(info *** Info ***)
|
||||||
|
|
|
@ -88,6 +88,9 @@
|
||||||
#include "sim_defs.h"
|
#include "sim_defs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifdef HAVE_WINMM
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SIM_INTERNAL_CLK (SIM_NTIMERS+(1<<30))
|
#define SIM_INTERNAL_CLK (SIM_NTIMERS+(1<<30))
|
||||||
#define SIM_INTERNAL_UNIT sim_internal_timer_unit
|
#define SIM_INTERNAL_UNIT sim_internal_timer_unit
|
||||||
|
@ -462,7 +465,7 @@ return 0;
|
||||||
}
|
}
|
||||||
#endif /* CLOCK_REALTIME */
|
#endif /* CLOCK_REALTIME */
|
||||||
|
|
||||||
#elif defined (_WIN32)
|
#elif defined (_WIN32) || defined(HAVE_WINMM)
|
||||||
|
|
||||||
/* Win32 routines */
|
/* Win32 routines */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue