diff options
author | Vincent Bénony | 2015-12-11 15:25:48 +0100 |
---|---|---|
committer | Vincent Bénony | 2016-01-06 16:17:39 +0100 |
commit | fae79955e5ce6e215dcf457059c5744a85c76a80 (patch) | |
tree | 001ea5dd4b8040e79c71fdfc24f7b8ad48abbdfa /backends/platform | |
parent | 1657b9d4326d7749d4e5b6928364416c3936a726 (diff) | |
download | scummvm-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')
-rw-r--r-- | backends/platform/ios7/ios7_osys_main.cpp | 9 | ||||
-rw-r--r-- | backends/platform/ios7/ios7_video.mm | 10 |
2 files changed, 13 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(¤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) { diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm index 3a3feafcf8..e3c3edf06b 100644 --- a/backends/platform/ios7/ios7_video.mm +++ b/backends/platform/ios7/ios7_video.mm @@ -340,22 +340,32 @@ uint getSizeNextPOT(uint size) { UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingersSwipeRight:)]; swipeRight.direction = UISwipeGestureRecognizerDirectionRight; swipeRight.numberOfTouchesRequired = 2; + swipeRight.delaysTouchesBegan = NO; + swipeRight.delaysTouchesEnded = NO; UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingersSwipeLeft:)]; swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft; swipeLeft.numberOfTouchesRequired = 2; + swipeLeft.delaysTouchesBegan = NO; + swipeLeft.delaysTouchesEnded = NO; UISwipeGestureRecognizer *swipeUp = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingersSwipeUp:)]; swipeUp.direction = UISwipeGestureRecognizerDirectionUp; swipeUp.numberOfTouchesRequired = 2; + swipeUp.delaysTouchesBegan = NO; + swipeUp.delaysTouchesEnded = NO; UISwipeGestureRecognizer *swipeDown = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingersSwipeDown:)]; swipeDown.direction = UISwipeGestureRecognizerDirectionDown; swipeDown.numberOfTouchesRequired = 2; + swipeDown.delaysTouchesBegan = NO; + swipeDown.delaysTouchesEnded = NO; UITapGestureRecognizer *doubleTapTwoFingers = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingersDoubleTap:)]; doubleTapTwoFingers.numberOfTapsRequired = 2; doubleTapTwoFingers.numberOfTouchesRequired = 2; + doubleTapTwoFingers.delaysTouchesBegan = NO; + doubleTapTwoFingers.delaysTouchesEnded = NO; [self addGestureRecognizer:swipeRight]; [self addGestureRecognizer:swipeLeft]; |