From 7a81950819eebaf0afd8925606e184a0263198ec Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 18 Jun 2016 11:17:34 -0700 Subject: [PATCH] Enable sustained performance mode on N+ when streaming --- app/src/main/java/com/limelight/Game.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/com/limelight/Game.java b/app/src/main/java/com/limelight/Game.java index c647ad73..596e0ce1 100644 --- a/app/src/main/java/com/limelight/Game.java +++ b/app/src/main/java/com/limelight/Game.java @@ -258,6 +258,12 @@ public class Game extends Activity implements SurfaceHolder.Callback, 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); if (prefConfig.onscreenController) {