[FS9] Let IDirectPlay8Client::Connect process request asynchronously

This commit is contained in:
Roland Rossgotterer
2019-12-21 10:24:55 +01:00
committed by Mat Sutcliffe
parent a6a787fdd7
commit b7c2775ea2
6 changed files with 69 additions and 41 deletions

View File

@@ -26,6 +26,9 @@ namespace BlackSimPlugin
{
namespace Fs9
{
HRESULT inline s_success_pending() { return DPNSUCCESS_PENDING; }
bool inline isPending(HRESULT hr) { return hr == s_success_pending(); }
//! 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
@@ -49,6 +52,8 @@ namespace BlackSimPlugin
//! Log categories
static const BlackMisc::CLogCategoryList &getLogCategories();
public slots:
//! Send a custom DirectPlay message
HRESULT sendMessage(const QByteArray &data);
@@ -60,6 +65,9 @@ namespace BlackSimPlugin
//! Received custom FS9 packet
void customPacketReceived(const QByteArray &data);
//! Async operatione complete
void connectionComplete();
protected:
//! DirectPlay message handler
HRESULT directPlayMessageHandler(DWORD messageId, void *msgBuffer);