mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
[FS9] Stop using Fs9Host and Fs9Client as CContinuousWorkers
Both were continuous workers since a blocking IDirectPlay8Peer::SendTo() method was used. Since we use the default async method now, we don't need the threaded implementation any longer. It still could happen that GUI blocks for too long, but that would happen also for other simulator drivers. ref T433
This commit is contained in:
committed by
Mat Sutcliffe
parent
949e013f0b
commit
d6d2c0cc80
@@ -18,7 +18,6 @@
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
#include <QScopedPointer>
|
||||
#include <dplay8.h>
|
||||
#include <functional>
|
||||
@@ -31,13 +30,13 @@ namespace BlackSimPlugin
|
||||
//! DirectPlay peer implementation
|
||||
//! More information can be found in the DirectX9 SDK documentation
|
||||
//! http://doc.51windows.net/Directx9_SDK/?url=/Directx9_SDK/play/dplay.htm
|
||||
class CDirectPlayPeer : public BlackMisc::CContinuousWorker
|
||||
class CDirectPlayPeer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
CDirectPlayPeer(QObject *owner, const BlackMisc::Aviation::CCallsign &callsign);
|
||||
CDirectPlayPeer(QObject *parent, const BlackMisc::Aviation::CCallsign &callsign);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CDirectPlayPeer();
|
||||
@@ -91,8 +90,6 @@ namespace BlackSimPlugin
|
||||
// We need the Id of the users player, because we are sending packets only to him
|
||||
std::atomic<DPNID> m_playerUser = {0}; //!< User player Id
|
||||
|
||||
QMutex m_mutexHostList; //!< Host list mutex
|
||||
|
||||
using TCallbackWrapper = CallbackWrapper<CDirectPlayPeer, HRESULT, DWORD, void *>; //!< DirectPlay peer message handler wrapper
|
||||
TCallbackWrapper m_callbackWrapper; //!< Callback wrapper
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user