Skip to content

Commit 352ff63

Browse files
committed
also send timestamp for back
1 parent 91fc804 commit 352ff63

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/src/main/java/org/cocos2dx/lib/Cocos2dxGLSurfaceView.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,11 @@ class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
270270
cocos2dxRenderer.handleKeyDown(KeyEvent.KEYCODE_BACK)
271271
}
272272
} else {
273+
val currentTime = System.nanoTime()
273274
queueEvent {
275+
if (sendTimestampEvents)
276+
GeodeUtils.setNextInputTimestamp(currentTime)
277+
274278
GeodeUtils.nativeKeyDown(KeyEvent.KEYCODE_BACK, 0, false)
275279
}
276280
}

0 commit comments

Comments
 (0)