mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-19 13:00:12 -07:00
Update GLFW window state (hover, visibility)
This fixes DynamicFPS mod being broken
This commit is contained in:
parent
b0af8e43f4
commit
a0262bd08b
6 changed files with 42 additions and 4 deletions
|
|
@ -152,6 +152,7 @@ public class BaseMainActivity extends BaseActivity {
|
|||
final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
||||
final View decorView = getWindow().getDecorView();
|
||||
decorView.setSystemUiVisibility(uiOptions);
|
||||
CallbackBridge.nativeSetWindowAttrib(LWJGLGLFWKeycode.GLFW_HOVERED, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -159,10 +160,23 @@ public class BaseMainActivity extends BaseActivity {
|
|||
if (CallbackBridge.isGrabbing()){
|
||||
sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_ESCAPE);
|
||||
}
|
||||
CallbackBridge.nativeSetWindowAttrib(LWJGLGLFWKeycode.GLFW_HOVERED, 0);
|
||||
mIsResuming = false;
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
CallbackBridge.nativeSetWindowAttrib(LWJGLGLFWKeycode.GLFW_VISIBLE, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
CallbackBridge.nativeSetWindowAttrib(LWJGLGLFWKeycode.GLFW_VISIBLE, 0);
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
public static void fullyExit() {
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue