mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Partially revert 8037fb76fc to fix mouse polling issues on Windows
This commit is contained in:
+36
-26
@@ -15,6 +15,11 @@ Item {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
// The StackView will trigger a visibility change when
|
||||||
|
// we're pushed onto it, causing our onVisibleChanged
|
||||||
|
// routine to run, but only if we start as invisible
|
||||||
|
visible: false
|
||||||
|
|
||||||
function stageStarting(stage)
|
function stageStarting(stage)
|
||||||
{
|
{
|
||||||
// Update the spinner text
|
// Update the spinner text
|
||||||
@@ -100,34 +105,39 @@ Item {
|
|||||||
id: gamepadKeyNav
|
id: gamepadKeyNav
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView.onActivated: {
|
StackView.onDeactivating: {
|
||||||
// Hide the toolbar before we start loading
|
// Show the toolbar again when popped off the stack
|
||||||
toolBar.visible = false
|
toolBar.visible = true
|
||||||
|
|
||||||
// Set the hint text. We do this here rather than
|
|
||||||
// in the hintText control itself to synchronize
|
|
||||||
// with Session.exec() which requires no concurrent
|
|
||||||
// gamepad usage.
|
|
||||||
hintText.text = gamepadKeyNav.getConnectedGamepads() > 0 ?
|
|
||||||
"Tip: Press Start+Select+L1+R1 to disconnect your session" :
|
|
||||||
"Tip: Press Ctrl+Alt+Shift+Q to disconnect your session"
|
|
||||||
|
|
||||||
// Hook up our signals
|
|
||||||
session.stageStarting.connect(stageStarting)
|
|
||||||
session.stageFailed.connect(stageFailed)
|
|
||||||
session.connectionStarted.connect(connectionStarted)
|
|
||||||
session.displayLaunchError.connect(displayLaunchError)
|
|
||||||
session.displayLaunchWarning.connect(displayLaunchWarning)
|
|
||||||
session.quitStarting.connect(quitStarting)
|
|
||||||
session.sessionFinished.connect(sessionFinished)
|
|
||||||
|
|
||||||
// Run the streaming session to completion
|
|
||||||
session.exec(Screen.virtualX, Screen.virtualY)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView.onDeactivating: {
|
// !!! Changing this to use the StackView activation callbacks
|
||||||
// Show the toolbar again
|
// causes our mouse polling rate to drop significantly on
|
||||||
toolBar.visible = true
|
// Windows for some reason !!!
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (visible) {
|
||||||
|
// Hide the toolbar before we start loading
|
||||||
|
toolBar.visible = false
|
||||||
|
|
||||||
|
// Set the hint text. We do this here rather than
|
||||||
|
// in the hintText control itself to synchronize
|
||||||
|
// with Session.exec() which requires no concurrent
|
||||||
|
// gamepad usage.
|
||||||
|
hintText.text = gamepadKeyNav.getConnectedGamepads() > 0 ?
|
||||||
|
"Tip: Press Start+Select+L1+R1 to disconnect your session" :
|
||||||
|
"Tip: Press Ctrl+Alt+Shift+Q to disconnect your session"
|
||||||
|
|
||||||
|
// Hook up our signals
|
||||||
|
session.stageStarting.connect(stageStarting)
|
||||||
|
session.stageFailed.connect(stageFailed)
|
||||||
|
session.connectionStarted.connect(connectionStarted)
|
||||||
|
session.displayLaunchError.connect(displayLaunchError)
|
||||||
|
session.displayLaunchWarning.connect(displayLaunchWarning)
|
||||||
|
session.quitStarting.connect(quitStarting)
|
||||||
|
session.sessionFinished.connect(sessionFinished)
|
||||||
|
|
||||||
|
// Run the streaming session to completion
|
||||||
|
session.exec(Screen.virtualX, Screen.virtualY)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|||||||
Reference in New Issue
Block a user