Return the selected refresh rate now that the capped FPS mode is not default

This commit is contained in:
Cameron Gutman 2022-05-14 20:53:42 -05:00
parent f1ccba39e8
commit aa60671c88

View File

@ -780,18 +780,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
streamView.setDesiredAspectRatio((double)prefConfig.width / (double)prefConfig.height);
}
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION) ||
getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
// TVs may take a few moments to switch refresh rates, and we can probably assume
// it will be eventually activated.
// TODO: Improve this
return displayRefreshRate;
}
else {
// Use the actual refresh rate of the display, since the preferred refresh rate or mode
// may not actually be applied (ex: Pixel 4 with Smooth Display disabled).
return getWindowManager().getDefaultDisplay().getRefreshRate();
}
// FIXME: This assumes the refresh rate will always be successfully applied
return displayRefreshRate;
}
@SuppressLint("InlinedApi")