mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 21:40:06 +00:00
Don't poll gamepad input when the GUI is not focused/visible
This commit is contained in:
1 parent
9b3d4c1ad7
commit
2a63ad53d7
5 files changed
+43
-21
No files matched your search
@@ -76,8 +76,10 @@ Item {
|
||||
streamSegueErrorDialog.text += "\n\n" + qsTr("This PC's Internet connection is blocking Moonlight. Streaming over the Internet may not work while connected to this network.")
|
||||
}
|
||||
|
||||
// Enable GUI gamepad usage now
|
||||
SdlGamepadKeyNavigation.enable()
|
||||
if (window.gamepadInputActive) {
|
||||
// Re-enable GUI gamepad usage now
|
||||
SdlGamepadKeyNavigation.enable()
|
||||
}
|
||||
|
||||
if (quitAfter) {
|
||||
if (streamSegueErrorDialog.text) {
|
||||
@@ -119,8 +121,10 @@ Item {
|
||||
// Show the toolbar again when popped off the stack
|
||||
toolBar.visible = true
|
||||
|
||||
// Enable GUI gamepad usage now
|
||||
SdlGamepadKeyNavigation.enable()
|
||||
if (window.gamepadInputActive) {
|
||||
// Re-enable GUI gamepad usage now
|
||||
SdlGamepadKeyNavigation.enable()
|
||||
}
|
||||
}
|
||||
|
||||
StackView.onActivated: {
|
||||
|
||||
Reference in new issue
Block a user