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:
Cameron Gutman 2024-02-17 19:16:35 -06:00
parent 2ba7f0d989
commit 082cc84a71

View File

@ -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) {
// create virtual onscreen controller
virtualController = new VirtualController(controllerHandler,
@ -1054,16 +1048,10 @@ public class Game extends Activity implements SurfaceHolder.Callback,
// that case here too.
if (isInMultiWindowMode) {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Disable performance optimizations for foreground
getWindow().setSustainedPerformanceMode(false);
decoderRenderer.notifyVideoBackground();
}
else {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Enable performance optimizations for foreground
getWindow().setSustainedPerformanceMode(true);
decoderRenderer.notifyVideoForeground();
}