From 52678cfe3507cbfbc197a814e8079afedce68e0e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 6 Nov 2016 01:04:50 -0700 Subject: [PATCH] Move the mouse cursor 1 pixel each direction when connecting to force the screen to wake up --- .../src/com/limelight/nvstream/NvConnection.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/moonlight-common/src/com/limelight/nvstream/NvConnection.java b/moonlight-common/src/com/limelight/nvstream/NvConnection.java index 40d4b7d5..3982202d 100644 --- a/moonlight-common/src/com/limelight/nvstream/NvConnection.java +++ b/moonlight-common/src/com/limelight/nvstream/NvConnection.java @@ -362,6 +362,17 @@ public class NvConnection { } } + // Move the mouse cursor very slightly to wake the screen up for + // gamepad-only scenarios + sendMouseMove((short) 1, (short) 1); + try { + Thread.sleep(10); + } catch (InterruptedException e) {} + sendMouseMove((short) -1, (short) -1); + try { + Thread.sleep(10); + } catch (InterruptedException e) {} + context.connListener.connectionStarted(); }