mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Reduce the priority of background polling threads
This commit is contained in:
@@ -74,6 +74,13 @@ private:
|
|||||||
|
|
||||||
void run() override
|
void run() override
|
||||||
{
|
{
|
||||||
|
// Reduce the power and performance impact of our
|
||||||
|
// computer status polling while it's running.
|
||||||
|
setPriority(QThread::LowPriority);
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
|
||||||
|
setServiceLevel(QThread::QualityOfService::Eco);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Always fetch the applist the first time
|
// Always fetch the applist the first time
|
||||||
int pollsSinceLastAppListFetch = POLLS_PER_APPLIST_FETCH;
|
int pollsSinceLastAppListFetch = POLLS_PER_APPLIST_FETCH;
|
||||||
while (!isInterruptionRequested()) {
|
while (!isInterruptionRequested()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user