mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-25 22:13:04 +00:00
Return the selected refresh rate now that the capped FPS mode is not default
This commit is contained in:
parent
f1ccba39e8
commit
aa60671c88
@ -780,18 +780,8 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
streamView.setDesiredAspectRatio((double)prefConfig.width / (double)prefConfig.height);
|
streamView.setDesiredAspectRatio((double)prefConfig.width / (double)prefConfig.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEVISION) ||
|
// FIXME: This assumes the refresh rate will always be successfully applied
|
||||||
getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK)) {
|
return displayRefreshRate;
|
||||||
// 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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("InlinedApi")
|
@SuppressLint("InlinedApi")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user