mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
Add REFRESH parameter option to Android version. You can use this parameter to
specify a preferred refresh rate for Retroarch to use.
This commit is contained in:
parent
5c716339de
commit
84bf2b0705
@ -1,6 +1,8 @@
|
|||||||
package com.retroarch.browser.retroactivity;
|
package com.retroarch.browser.retroactivity;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
public final class RetroActivityFuture extends RetroActivityCamera {
|
public final class RetroActivityFuture extends RetroActivityCamera {
|
||||||
|
|
||||||
@ -25,6 +27,17 @@ public final class RetroActivityFuture extends RetroActivityCamera {
|
|||||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||||
| API_SYSTEM_UI_FLAG_FULLSCREEN
|
| API_SYSTEM_UI_FLAG_FULLSCREEN
|
||||||
| API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
| API_SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||||
|
|
||||||
|
// Check for REFRESH parameter
|
||||||
|
Intent retro = getIntent();
|
||||||
|
String refresh = retro.getStringExtra("REFRESH");
|
||||||
|
|
||||||
|
// If REFRESH parameter is provided then try to set refreshrate accordingly
|
||||||
|
if(refresh != null) {
|
||||||
|
WindowManager.LayoutParams params = getWindow().getAttributes();
|
||||||
|
params.preferredRefreshRate = Integer.parseInt(refresh);
|
||||||
|
getWindow().setAttributes(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user