@@ -390,6 +390,9 @@ object GeodeUtils {
390
390
return " "
391
391
}
392
392
393
+ /* *
394
+ * Returns the current version code of the launcher.
395
+ */
393
396
@JvmStatic
394
397
fun getLauncherVersion (): Int {
395
398
return BuildConfig .VERSION_CODE
@@ -461,9 +464,16 @@ object GeodeUtils {
461
464
}
462
465
463
466
// vibration
467
+
468
+ /* *
469
+ * If vibration is supported on the device.
470
+ */
464
471
@JvmStatic
465
472
fun vibrateSupported (): Boolean = getVibrator()?.hasVibrator() == true
466
473
474
+ /* *
475
+ * Vibrates for the given amount of time.
476
+ */
467
477
@JvmStatic
468
478
fun vibrate (ms : Long ) {
469
479
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
@@ -474,6 +484,10 @@ object GeodeUtils {
474
484
}
475
485
}
476
486
487
+ /* *
488
+ * Vibrates with the given pattern.
489
+ * @see android.os.VibrationEffect.createWaveform
490
+ */
477
491
@JvmStatic
478
492
fun vibratePattern (pattern : LongArray , repeat : Int ) {
479
493
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
@@ -535,6 +549,10 @@ object GeodeUtils {
535
549
capabilityListener = WeakReference (listener)
536
550
}
537
551
552
+ /* *
553
+ * Reports that the game client supports a feature.
554
+ * These features typically require callbacks into the game, so ensure that the required methods are registered first.
555
+ */
538
556
@JvmStatic
539
557
fun reportPlatformCapability (capability : String? ): Boolean {
540
558
if (capability.isNullOrEmpty()) {
@@ -558,6 +576,10 @@ object GeodeUtils {
558
576
external fun nativeActionScroll (scrollX : Float , scrollY : Float )
559
577
external fun resizeSurface (width : Int , height : Int )
560
578
561
- // represents the timestamp of the next input callback, in nanoseconds (most events don't send it, but it's there)
579
+ /* *
580
+ * Gives the timestamp of the next input callback, in nanoseconds.
581
+ * Enable this by sending the "timestamp_inputs" platform capability.
582
+ * @see reportPlatformCapability
583
+ */
562
584
external fun setNextInputTimestamp (timestamp : Long )
563
585
}
0 commit comments