|
@@ -279,6 +279,7 @@ getEnv(JavaVM* vm)
|
|
|
CGPoint position = [touch locationInView: nil];
|
|
|
float scale = _glview.contentScaleFactor;
|
|
|
//NSLog(@"multipleTouchEnabled=%d", _window.rootViewController.view.multipleTouchEnabled); // true
|
|
|
+ // NOTE: cast to jlong is required, otherwise JmeAppHarness receives non-sense values
|
|
|
(*e)->CallVoidMethod(e, self.harness, self.injectTouchBegin, (jint) touch.hash, (jlong) touch.timestamp, position.x * scale, position.y * scale);
|
|
|
if ((*e)->ExceptionCheck(e)) {
|
|
|
NSLog(@"Could not invoke iOS Harness injectTouchBegin");
|
|
@@ -312,7 +313,7 @@ getEnv(JavaVM* vm)
|
|
|
NSLog(@"touchesEnded");
|
|
|
JNIEnv* e = getEnv(self.vm);
|
|
|
if (e) {
|
|
|
- NSEnumerator *enumerator = [touches objectEnumerator];
|
|
|
+ NSEnumerator *enumerator = [touches objectEnumerator];
|
|
|
UITouch *touch;
|
|
|
while (touch = [enumerator nextObject]) {
|
|
|
CGPoint position = [touch locationInView: nil];
|