fix opengl context being deleted after it no longer exists

This commit is contained in:
Fleeym committed 2024-01-25 19:58:09 +02:00
1 parent 7eb06e175f
commit c3f80e9c74
1 file changed
+9 -4
@@ -336,14 +336,19 @@ class GeometryDashActivity : AppCompatActivity(), Cocos2dxHelper.Cocos2dxHelperL
}
}
override fun onRestart() {
super.onRestart()
mIsOnPause = false
BaseRobTopActivity.isPaused = false
if (!this.mIsRunning) {
resumeGame()
}
}
override fun onPause() {
super.onPause()
mIsOnPause = true
BaseRobTopActivity.isPaused = true
}
override fun onStop() {
super.onStop()
if (mIsRunning) {
pauseGame()
}