From ae748166d06e756a0a6abab582dc341494a9b2da Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 17 Mar 2019 11:05:53 +0100 Subject: Codechange: Use platform independent C++11 function for sleeping on a thread. --- src/video/allegro_v.cpp | 1 + src/video/cocoa/event.mm | 1 + src/video/cocoa/fullscreen.mm | 3 ++- src/video/dedicated_v.cpp | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/video') diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp index 53a42393e..c21f88d67 100644 --- a/src/video/allegro_v.cpp +++ b/src/video/allegro_v.cpp @@ -25,6 +25,7 @@ #include "../core/random_func.hpp" #include "../core/math_func.hpp" #include "../framerate_type.h" +#include "../thread.h" #include "allegro_v.h" #include 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 /* 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); } diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index e0096c893..5af900080 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -22,6 +22,7 @@ #include "../company_func.h" #include "../core/random_func.hpp" #include "../saveload/saveload.h" +#include "../thread.h" #include "dedicated_v.h" #ifdef __OS2__ -- cgit v1.2.3-70-g09d2