keep screen on in `gameactivity` (#450)

This commit is contained in:
Ishan09811 2024-03-08 18:57:06 +05:30 committed by GitHub
parent e71a8bec9c
commit 498d19fa51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,6 +85,7 @@ public class GameActivity extends BaseActivity implements EmulatorCallback {
@Override
protected void onResume() {
super.onResume();
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
InputHandler.reset();