disable auto swap interval

This commit is contained in:
Chloe committed 2026-09-07 00:41:18 -07:00
1 parent 1773e54c84
commit a32589b06c
3 files changed
+2 -4

No files matched your search

+2
View File
@@ -1,4 +1,5 @@
#include <swappy/swappyGL.h> #include <swappy/swappyGL.h>
#include <swappy/swappyGL_extra.h>
#include <android/native_window_jni.h> #include <android/native_window_jni.h>
#include <memory> #include <memory>
@@ -59,5 +60,6 @@ JNIEXPORT void JNICALL Java_com_geode_launcher_LauncherFix_setSwapInterval(
jobject, jobject,
jlong interval_ns jlong interval_ns
) { ) {
SwappyGL_setAutoSwapInterval(false);
SwappyGL_setSwapIntervalNS(interval_ns); SwappyGL_setSwapIntervalNS(interval_ns);
} }
@@ -476,7 +476,6 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
val frameRate = mLimitedRefreshRate val frameRate = mLimitedRefreshRate
if (frameRate != null) { if (frameRate != null) {
glSurfaceView.setMaxFramerate(frameRate) glSurfaceView.setMaxFramerate(frameRate)
// renderer.limitFrameRate(frameRate)
} }
editText.inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS editText.inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
@@ -67,7 +67,6 @@ class Cocos2dxGLSurfaceView(context: Context) : ExplicitGLSurfaceView(context) {
var controllerEventsEnabled = false var controllerEventsEnabled = false
private set private set
var supportsResizeEvents = false var supportsResizeEvents = false
var maxFrameRate: Int? = null
var cocos2dxEditText: AppCompatEditText? = null var cocos2dxEditText: AppCompatEditText? = null
set(value) { set(value) {
@@ -576,9 +575,7 @@ class Cocos2dxGLSurfaceView(context: Context) : ExplicitGLSurfaceView(context) {
} }
fun setMaxFramerate(rate: Int) { fun setMaxFramerate(rate: Int) {
// maxFrameRate = rate
cocos2dxRenderer.limitFrameRate(rate) cocos2dxRenderer.limitFrameRate(rate)
// LauncherFix.setSwapInterval((1_000_000_000.0 / rate).roundToLong())
} }
object InputListener : InputManager.InputDeviceListener { object InputListener : InputManager.InputDeviceListener {