Skip to content

Commit

Permalink
Remove sustained performance mode
Browse files Browse the repository at this point in the history
Our CPU usage is so low that it's doubtful we'd ever trigger thermal throttling.
  • Loading branch information
cgutman committed Feb 18, 2024
1 parent 2ba7f0d commit 082cc84
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions app/src/main/java/com/limelight/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,6 @@ public void notifyCrash(Exception e) {
}
}

// 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,
Expand Down Expand Up @@ -1054,16 +1048,10 @@ public void onMultiWindowModeChanged(boolean isInMultiWindowMode) {
// 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();
}

Expand Down

0 comments on commit 082cc84

Please sign in to comment.