Commit 9c8b5c08 authored by deregges's avatar deregges

Fixed system turning screen off in game

parent 9b239ddc
......@@ -11,6 +11,7 @@ import android.util.DisplayMetrics
import android.view.MotionEvent
import android.view.SurfaceView
import android.view.View
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import io.ender.pathchaser.menu.Settings
import io.ender.pathchaser.paths.PathManager
......@@ -55,6 +56,7 @@ class GameActivity : AppCompatActivity(), SensorEventListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(surface)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
override fun onPause() {
......
......@@ -15,4 +15,4 @@ org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
android.useAndroidX=true
android.enableJetifier=true
appVersion=1.1.0
\ No newline at end of file
appVersion=1.2.0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment