mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-18 10:32:43 +00:00
Fix pointer capture on Android Q Beta 3
This commit is contained in:
parent
99b53f9a6a
commit
393a4c9c8a
@ -1382,10 +1382,18 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
connected = true;
|
||||
connecting = false;
|
||||
|
||||
// Hide the mouse cursor now. Doing it before
|
||||
// dismissing the spinner seems to be undone
|
||||
// when the spinner gets displayed.
|
||||
inputCaptureProvider.enableCapture();
|
||||
// Hide the mouse cursor now after a short delay.
|
||||
// Doing it before dismissing the spinner seems to be undone
|
||||
// when the spinner gets displayed. On Android Q, even now
|
||||
// is too early to capture. We will delay a second to allow
|
||||
// the spinner to dismiss before capturing.
|
||||
Handler h = new Handler();
|
||||
h.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
inputCaptureProvider.enableCapture();
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// Keep the display on
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
Loading…
x
Reference in New Issue
Block a user