mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Qt/NetPlayBrowser: Refresh session list asynchronously
This commit is contained in:
@ -4,10 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "Common/Event.h"
|
||||
#include "Common/Flag.h"
|
||||
#include "UICommon/NetPlayIndex.h"
|
||||
|
||||
class QCheckBox;
|
||||
@ -24,6 +30,7 @@ class NetPlayBrowser : public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NetPlayBrowser(QWidget* parent = nullptr);
|
||||
~NetPlayBrowser();
|
||||
|
||||
void accept() override;
|
||||
signals:
|
||||
@ -34,6 +41,8 @@ private:
|
||||
void ConnectWidgets();
|
||||
|
||||
void Refresh();
|
||||
void RefreshLoop();
|
||||
void UpdateList();
|
||||
|
||||
void OnSelectionChanged();
|
||||
|
||||
@ -51,4 +60,10 @@ private:
|
||||
QRadioButton* m_radio_public;
|
||||
|
||||
std::vector<NetPlaySession> m_sessions;
|
||||
|
||||
std::thread m_refresh_thread;
|
||||
std::optional<std::map<std::string, std::string>> m_refresh_filters;
|
||||
std::mutex m_refresh_filters_mutex;
|
||||
Common::Flag m_refresh_run;
|
||||
Common::Event m_refresh_event;
|
||||
};
|
||||
|
Reference in New Issue
Block a user