mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Ignore bogus refresh rates just to be on the safe side
This commit is contained in:
parent
d4ff58b3ad
commit
3bcd2ee068
@ -12,7 +12,7 @@ android {
|
|||||||
targetSdkVersion 27
|
targetSdkVersion 27
|
||||||
|
|
||||||
versionName "5.6.5"
|
versionName "5.6.5"
|
||||||
versionCode = 144
|
versionCode = 145
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "root"
|
flavorDimensions "root"
|
||||||
|
@ -329,6 +329,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
// Hopefully, we can get rid of this once someone comes up with a better way
|
// Hopefully, we can get rid of this once someone comes up with a better way
|
||||||
// to track the state of the pipeline and time frames.
|
// to track the state of the pipeline and time frames.
|
||||||
int roundedRefreshRate = Math.round(displayRefreshRate);
|
int roundedRefreshRate = Math.round(displayRefreshRate);
|
||||||
|
if (roundedRefreshRate <= 49) {
|
||||||
|
// Let's avoid clearly bogus refresh rates
|
||||||
|
roundedRefreshRate = 60;
|
||||||
|
}
|
||||||
if (!prefConfig.disableFrameDrop && prefConfig.fps >= roundedRefreshRate) {
|
if (!prefConfig.disableFrameDrop && prefConfig.fps >= roundedRefreshRate) {
|
||||||
prefConfig.fps = roundedRefreshRate - 1;
|
prefConfig.fps = roundedRefreshRate - 1;
|
||||||
LimeLog.info("Adjusting FPS target for screen to "+prefConfig.fps);
|
LimeLog.info("Adjusting FPS target for screen to "+prefConfig.fps);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user