From fae79955e5ce6e215dcf457059c5744a85c76a80 Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Fri, 11 Dec 2015 15:25:48 +0100 Subject: IOS: Better emulation of the right mouse button --- backends/platform/ios7/ios7_osys_main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'backends/platform/ios7/ios7_osys_main.cpp') diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index cb712b9c38..cd62148ca9 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -28,6 +28,7 @@ #include #include +#include #include "common/scummsys.h" #include "common/util.h" @@ -196,12 +197,8 @@ void OSystem_iOS7::suspendLoop() { } uint32 OSystem_iOS7::getMillis(bool skipRecord) { - //printf("getMillis()\n"); - - struct timeval currentTime; - gettimeofday(¤tTime, NULL); - return (uint32)(((currentTime.tv_sec - _startTime.tv_sec) * 1000) + - ((currentTime.tv_usec - _startTime.tv_usec) / 1000)) - _timeSuspended; + CFTimeInterval timeInSeconds = CACurrentMediaTime(); + return (uint32) (timeInSeconds * 1000.0); } void OSystem_iOS7::delayMillis(uint msecs) { -- cgit v1.2.3