Don't poll gamepad input when the GUI is not focused/visible
This commit is contained in:
parent
9b3d4c1ad7
commit
2a63ad53d7
5 changed files with 43 additions and 21 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue