better timer
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
b285d1ba8d
commit
d36c9190ec
4 changed files with 7 additions and 2 deletions
|
|
@ -344,7 +344,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "MSYS")
|
|||
PRIVATE
|
||||
USE_GDI
|
||||
)
|
||||
list(APPEND LIBRARIES gdi32)
|
||||
list(APPEND LIBRARIES gdi32 winmm)
|
||||
target_link_options(
|
||||
Mw
|
||||
PRIVATE
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#ifdef _MILSKO
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#ifndef GWLP_USERDATA
|
||||
#define GWLP_USERDATA GWL_USERDATA
|
||||
#define GWLP_WNDPROC GWL_WNDPROC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#if defined(_WIN32)
|
||||
long MwTimeGetTick(void) {
|
||||
return GetTickCount();
|
||||
return timeGetTime();
|
||||
}
|
||||
|
||||
void MwTimeSleep(int ms) {
|
||||
|
|
|
|||
|
|
@ -1072,6 +1072,10 @@ int MwLibraryInit(void) {
|
|||
NULL};
|
||||
int i;
|
||||
|
||||
#ifdef _WIN32
|
||||
timeBeginPeriod(10);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WAYLAND
|
||||
if(MwWaylandCairoOnly) {
|
||||
calls[0] = MwLLCairoCallInit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue