summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-03-17 11:05:53 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-06 11:27:39 +0200
commitae748166d06e756a0a6abab582dc341494a9b2da (patch)
treed4c75246740f2e2ddd6978a6b14b17ac84bc27cf /src/video/cocoa
parent94c5269fa772304112b7c40d2c84794056f87717 (diff)
downloadopenttd-ae748166d06e756a0a6abab582dc341494a9b2da.tar.xz
Codechange: Use platform independent C++11 function for sleeping on a thread.
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/event.mm1
-rw-r--r--src/video/cocoa/fullscreen.mm3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index de812a70d..a8108b561 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -37,6 +37,7 @@
#include "../../core/math_func.hpp"
#include "../../texteff.hpp"
#include "../../window_func.h"
+#include "../../thread.h"
#import <sys/time.h> /* gettimeofday */
diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm
index 860866b33..3ce22133d 100644
--- a/src/video/cocoa/fullscreen.mm
+++ b/src/video/cocoa/fullscreen.mm
@@ -30,6 +30,7 @@
#include "../../core/sort_func.hpp"
#include "cocoa_v.h"
#include "../../gfx_func.h"
+#include "../../thread.h"
#include "../../os/macosx/macos.h"
/**
@@ -174,7 +175,7 @@ class FullscreenSubdriver : public CocoaSubdriver {
double adjustment = (target - position) / linesPerSecond;
- CSleep((uint32)(adjustment * 1000));
+ CSleep((uint32)adjustment * 1000);
}