mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-18 18:42:46 +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;
|
connected = true;
|
||||||
connecting = false;
|
connecting = false;
|
||||||
|
|
||||||
// Hide the mouse cursor now. Doing it before
|
// Hide the mouse cursor now after a short delay.
|
||||||
// dismissing the spinner seems to be undone
|
// Doing it before dismissing the spinner seems to be undone
|
||||||
// when the spinner gets displayed.
|
// when the spinner gets displayed. On Android Q, even now
|
||||||
inputCaptureProvider.enableCapture();
|
// 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
|
// Keep the display on
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user