TIMER: Support 1ms timer resolution in Cygwin

This commit is contained in:
Tony Lawrence 2022-06-14 15:39:55 -04:00 committed by Paul Koning
parent 8b181a360c
commit a06ab20512
2 changed files with 9 additions and 1 deletions

View file

@ -751,6 +751,11 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
endif
ifeq (cygwin,$(OSTYPE))
LIBEXT = $(LIBEXTSAVE)
LIBPATH += /usr/lib/w32api
ifneq (,$(call find_lib,winmm))
OS_CCDEFS += -DHAVE_WINMM
OS_LDFLAGS += -lwinmm
endif
endif
ifeq (,$(findstring HAVE_LIBSDL,$(VIDEO_CCDEFS)))
$(info *** Info ***)

View file

@ -88,6 +88,9 @@
#include "sim_defs.h"
#include <ctype.h>
#include <math.h>
#ifdef HAVE_WINMM
#include <windows.h>
#endif
#define SIM_INTERNAL_CLK (SIM_NTIMERS+(1<<30))
#define SIM_INTERNAL_UNIT sim_internal_timer_unit
@ -462,7 +465,7 @@ return 0;
}
#endif /* CLOCK_REALTIME */
#elif defined (_WIN32)
#elif defined (_WIN32) || defined(HAVE_WINMM)
/* Win32 routines */