Skip to content

Commit

Permalink
Pass source rect to PiP to smoothly animate to 16:9
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Nov 19, 2017
1 parent 44a3a14 commit f55d630
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/src/main/java/com/limelight/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.input.InputManager;
import android.media.AudioManager;
import android.net.ConnectivityManager;
Expand Down Expand Up @@ -368,6 +369,9 @@ public void onUserLeaveHint() {
enterPictureInPictureMode(
new PictureInPictureParams.Builder()
.setAspectRatio(new Rational(prefConfig.width, prefConfig.height))
.setSourceRectHint(new Rect(
streamView.getLeft(), streamView.getTop(),
streamView.getRight(), streamView.getBottom()))
.build());
}
}
Expand Down

0 comments on commit f55d630

Please sign in to comment.