mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-26 09:19:21 +00:00
disable auto swap interval
This commit is contained in:
3 files changed
+2
-4
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include <swappy/swappyGL.h>
|
||||
#include <swappy/swappyGL_extra.h>
|
||||
#include <android/native_window_jni.h>
|
||||
#include <memory>
|
||||
|
||||
@@ -59,5 +60,6 @@ JNIEXPORT void JNICALL Java_com_geode_launcher_LauncherFix_setSwapInterval(
|
||||
jobject,
|
||||
jlong interval_ns
|
||||
) {
|
||||
SwappyGL_setAutoSwapInterval(false);
|
||||
SwappyGL_setSwapIntervalNS(interval_ns);
|
||||
}
|
||||
@@ -476,7 +476,6 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
|
||||
val frameRate = mLimitedRefreshRate
|
||||
if (frameRate != null) {
|
||||
glSurfaceView.setMaxFramerate(frameRate)
|
||||
// renderer.limitFrameRate(frameRate)
|
||||
}
|
||||
|
||||
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
|
||||
private set
|
||||
var supportsResizeEvents = false
|
||||
var maxFrameRate: Int? = null
|
||||
|
||||
var cocos2dxEditText: AppCompatEditText? = null
|
||||
set(value) {
|
||||
@@ -576,9 +575,7 @@ class Cocos2dxGLSurfaceView(context: Context) : ExplicitGLSurfaceView(context) {
|
||||
}
|
||||
|
||||
fun setMaxFramerate(rate: Int) {
|
||||
// maxFrameRate = rate
|
||||
cocos2dxRenderer.limitFrameRate(rate)
|
||||
// LauncherFix.setSwapInterval((1_000_000_000.0 / rate).roundToLong())
|
||||
}
|
||||
|
||||
object InputListener : InputManager.InputDeviceListener {
|
||||
|
||||
Reference in new issue
Block a user