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:
Diablodiab 2016-01-11 21:45:46 +01:00
parent 5c716339de
commit 84bf2b0705

View File

@ -1,6 +1,8 @@
package com.retroarch.browser.retroactivity;
import android.view.View;
import android.view.WindowManager;
import android.content.Intent;
public final class RetroActivityFuture extends RetroActivityCamera {
@ -25,6 +27,17 @@ public final class RetroActivityFuture extends RetroActivityCamera {
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| API_SYSTEM_UI_FLAG_FULLSCREEN
| 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);
}
}
}