mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Avoid polling if the Qt window is minimized
This commit is contained in:
@@ -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