mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 10:31:07 +00:00
Fixes an issue that caused televisions to have frame pacing problems when setting the refresh rate below 50hz
This commit is contained in:
committed by
Cameron Gutman
parent
babfc99c35
commit
19b8032d06
@@ -712,6 +712,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
boolean isNativeResolutionStream = PreferenceConfiguration.isNativeResolution(prefConfig.width, prefConfig.height);
|
||||
boolean refreshRateIsGood = isRefreshRateGoodMatch(bestMode.getRefreshRate());
|
||||
boolean refreshRateIsEqual = isRefreshRateEqualMatch(bestMode.getRefreshRate());
|
||||
boolean isTelevision = getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
|
||||
|
||||
for (Display.Mode candidate : display.getSupportedModes()) {
|
||||
boolean refreshRateReduced = candidate.getRefreshRate() < bestMode.getRefreshRate();
|
||||
boolean resolutionReduced = candidate.getPhysicalWidth() < bestMode.getPhysicalWidth() ||
|
||||
@@ -766,6 +768,14 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
else if (!isRefreshRateEqualMatch(candidate.getRefreshRate())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// For refresh rates lower than 50hz, we want to check if the device is a TV.
|
||||
// Some TV's may have issues when attempting to lower its refresh rate
|
||||
// As opposed to mobile devices, which are designed to lower refresh rate
|
||||
// for battery life reasons.
|
||||
else if(isTelevision && candidate.getRefreshRate() < 50) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!isRefreshRateGoodMatch(candidate.getRefreshRate())) {
|
||||
|
||||
Reference in New Issue
Block a user