mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-24 08:58:04 +00:00
Make StreamingPreferences a proper singleton
This removes the need for several hacks in SettingsView to force updates and improves performance by not reloading preferences all over the place.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "nvcomputer.h"
|
||||
#include "nvpairingmanager.h"
|
||||
#include "settings/streamingpreferences.h"
|
||||
#include "settings/compatfetcher.h"
|
||||
|
||||
#include <qmdnsengine/server.h>
|
||||
@@ -218,7 +218,7 @@ class ComputerManager : public QObject
|
||||
friend class DelayedFlushThread;
|
||||
|
||||
public:
|
||||
explicit ComputerManager(QObject *parent = nullptr);
|
||||
explicit ComputerManager(StreamingPreferences* prefs);
|
||||
|
||||
virtual ~ComputerManager();
|
||||
|
||||
@@ -270,6 +270,7 @@ private:
|
||||
|
||||
void startPollingComputer(NvComputer* computer);
|
||||
|
||||
StreamingPreferences* m_Prefs;
|
||||
int m_PollingRef;
|
||||
QReadWriteLock m_Lock;
|
||||
QMap<QString, NvComputer*> m_KnownHosts;
|
||||
|
||||
Reference in New Issue
Block a user