mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-21 03:52:48 +00:00
Fix PiP overlay hiding with OSC disabled
This commit is contained in:
parent
b7ef8f54b7
commit
dbc9d78002
@ -496,13 +496,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
if (virtualController != null) {
|
if (virtualController != null) {
|
||||||
// Refresh layout of OSC for possible new screen size
|
// Refresh layout of OSC for possible new screen size
|
||||||
virtualController.refreshLayout();
|
virtualController.refreshLayout();
|
||||||
|
}
|
||||||
|
|
||||||
// Hide on-screen overlays in PiP mode
|
// Hide on-screen overlays in PiP mode
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
if (isInPictureInPictureMode()) {
|
if (isInPictureInPictureMode()) {
|
||||||
isHidingOverlays = true;
|
isHidingOverlays = true;
|
||||||
|
|
||||||
|
if (virtualController != null) {
|
||||||
virtualController.hide();
|
virtualController.hide();
|
||||||
|
}
|
||||||
|
|
||||||
performanceOverlayView.setVisibility(View.GONE);
|
performanceOverlayView.setVisibility(View.GONE);
|
||||||
notificationOverlayView.setVisibility(View.GONE);
|
notificationOverlayView.setVisibility(View.GONE);
|
||||||
@ -510,10 +513,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
else {
|
else {
|
||||||
isHidingOverlays = false;
|
isHidingOverlays = false;
|
||||||
|
|
||||||
virtualController.show();
|
|
||||||
|
|
||||||
// Restore overlays to previous state when leaving PiP
|
// Restore overlays to previous state when leaving PiP
|
||||||
|
|
||||||
|
if (virtualController != null) {
|
||||||
|
virtualController.show();
|
||||||
|
}
|
||||||
|
|
||||||
if (prefConfig.enablePerfOverlay) {
|
if (prefConfig.enablePerfOverlay) {
|
||||||
performanceOverlayView.setVisibility(View.VISIBLE);
|
performanceOverlayView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
@ -522,7 +527,6 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUserLeaveHint() {
|
public void onUserLeaveHint() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user