aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ios7/ios7_osys_main.cpp
diff options
context:
space:
mode:
authorVincent Bénony2015-12-11 15:25:48 +0100
committerVincent Bénony2016-01-06 16:17:39 +0100
commitfae79955e5ce6e215dcf457059c5744a85c76a80 (patch)
tree001ea5dd4b8040e79c71fdfc24f7b8ad48abbdfa /backends/platform/ios7/ios7_osys_main.cpp
parent1657b9d4326d7749d4e5b6928364416c3936a726 (diff)
downloadscummvm-rg350-fae79955e5ce6e215dcf457059c5744a85c76a80.tar.gz
scummvm-rg350-fae79955e5ce6e215dcf457059c5744a85c76a80.tar.bz2
scummvm-rg350-fae79955e5ce6e215dcf457059c5744a85c76a80.zip
IOS: Better emulation of the right mouse button
Diffstat (limited to 'backends/platform/ios7/ios7_osys_main.cpp')
-rw-r--r--backends/platform/ios7/ios7_osys_main.cpp9
1 files changed, 3 insertions, 6 deletions
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 <string.h>
#include <sys/time.h>
+#include <QuartzCore/QuartzCore.h>
#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(&currentTime, 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) {