mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-02 07:45:40 +00:00
Remove sustained performance mode
Our CPU usage is so low that it's doubtful we'd ever trigger thermal throttling.
This commit is contained in:
parent
2ba7f0d989
commit
082cc84a71
@ -506,12 +506,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use sustained performance mode on N+ to ensure consistent
|
|
||||||
// CPU availability
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
getWindow().setSustainedPerformanceMode(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prefConfig.onscreenController) {
|
if (prefConfig.onscreenController) {
|
||||||
// create virtual onscreen controller
|
// create virtual onscreen controller
|
||||||
virtualController = new VirtualController(controllerHandler,
|
virtualController = new VirtualController(controllerHandler,
|
||||||
@ -1054,16 +1048,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
// that case here too.
|
// that case here too.
|
||||||
if (isInMultiWindowMode) {
|
if (isInMultiWindowMode) {
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
|
|
||||||
// Disable performance optimizations for foreground
|
|
||||||
getWindow().setSustainedPerformanceMode(false);
|
|
||||||
decoderRenderer.notifyVideoBackground();
|
decoderRenderer.notifyVideoBackground();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
|
|
||||||
// Enable performance optimizations for foreground
|
|
||||||
getWindow().setSustainedPerformanceMode(true);
|
|
||||||
decoderRenderer.notifyVideoForeground();
|
decoderRenderer.notifyVideoForeground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user