Enable sustained performance mode on N+ when streaming

This commit is contained in:
Cameron Gutman 2016-06-18 11:17:34 -07:00
parent 74f212c702
commit 7a81950819

View File

@ -258,6 +258,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
streamView); streamView);
} }
// Use sustained performance mode on N+ to ensure consistent
// CPU availability
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
getWindow().setSustainedPerformanceMode(true);
}
inputCaptureProvider = InputCaptureManager.getInputCaptureProvider(this, this); inputCaptureProvider = InputCaptureManager.getInputCaptureProvider(this, this);
if (prefConfig.onscreenController) { if (prefConfig.onscreenController) {