XSession: move some status vars to session data
This commit is contained in:
parent
61da79720a
commit
aa31446121
@ -25,7 +25,6 @@ class XSession private constructor(val mActivity: Activity, val sessionData: XSe
|
||||
}
|
||||
|
||||
var mSessionName = "";
|
||||
var keyboardWithoutTextInputShown = false;
|
||||
|
||||
init {
|
||||
if (Globals.InhibitSuspend) {
|
||||
@ -40,7 +39,17 @@ class XSession private constructor(val mActivity: Activity, val sessionData: XSe
|
||||
|
||||
override fun getContext() = mActivity
|
||||
|
||||
override fun isKeyboardWithoutTextInputShown() = keyboardWithoutTextInputShown
|
||||
override fun isKeyboardWithoutTextInputShown() = sessionData.keyboardWithoutTextInputShown
|
||||
|
||||
override fun isPaused() = sessionData.isPaused
|
||||
|
||||
override fun runOnUiThread(runnable: Runnable?) = mActivity.runOnUiThread(runnable)
|
||||
|
||||
override fun getGLView() = sessionData.glView
|
||||
|
||||
override fun getWindow() = mActivity.window!!
|
||||
|
||||
override fun getWindowManager() = mActivity.windowManager!!
|
||||
|
||||
override fun showScreenKeyboardWithoutTextInputField(flags: Int) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
@ -62,8 +71,6 @@ class XSession private constructor(val mActivity: Activity, val sessionData: XSe
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun runOnUiThread(runnable: Runnable?) = mActivity.runOnUiThread(runnable)
|
||||
|
||||
override fun updateScreenOrientation() {
|
||||
var rotation: Int = windowManager.defaultDisplay.rotation
|
||||
NeoAccelerometerReader.setGyroInvertedOrientation(
|
||||
@ -92,12 +99,6 @@ class XSession private constructor(val mActivity: Activity, val sessionData: XSe
|
||||
return uiModeManager?.currentModeType == Configuration.UI_MODE_TYPE_TELEVISION || Globals.OuyaEmulation
|
||||
}
|
||||
|
||||
override fun getGLView() = sessionData.glView
|
||||
|
||||
override fun getWindow() = mActivity.window!!
|
||||
|
||||
override fun getWindowManager() = mActivity.windowManager!!
|
||||
|
||||
override fun setSystemMousePointerVisible(visible: Int) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
||||
glView?.pointerIcon = android.view.PointerIcon.getSystemIcon(mActivity,
|
||||
@ -105,8 +106,4 @@ class XSession private constructor(val mActivity: Activity, val sessionData: XSe
|
||||
else android.view.PointerIcon.TYPE_DEFAULT)
|
||||
}
|
||||
}
|
||||
|
||||
override fun isPaused(): Boolean {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
|
@ -11,4 +11,7 @@ class XSessionData {
|
||||
var audioThread: NeoAudioThread? = null
|
||||
var glView: NeoGLView? = null
|
||||
var client: NeoXorgViewClient? = null
|
||||
|
||||
var keyboardWithoutTextInputShown = false
|
||||
var isPaused = false
|
||||
}
|
Loading…
Reference in New Issue
Block a user