mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-26 14:00:08 +00:00
Avoid polling if the Qt window is minimized
This commit is contained in:
1 parent
860d317330
commit
f3309087ab
4 files changed
+23
-29
No files matched your search
@@ -36,15 +36,9 @@ GridView {
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
// Start polling when this view is shown
|
||||
ComputerManager.startPolling()
|
||||
|
||||
appModel.computerLost.connect(computerLost)
|
||||
}
|
||||
else {
|
||||
// Stop polling when this view is not on top
|
||||
ComputerManager.stopPollingAsync()
|
||||
|
||||
appModel.computerLost.disconnect(computerLost)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user