From 95e492f653a38be972a56e84e3626b18cd0d1f35 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Wed, 19 Aug 2015 21:46:54 +0100 Subject: [PATCH] DirectPlay: Remove already-initialised check in SPInit() I have no idea why I implemented this check in the first place, the Microsoft implementation doesn't do it and I think it might cause problems. --- src/directplay.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/directplay.c b/src/directplay.c index c3efea5..9c203b7 100644 --- a/src/directplay.c +++ b/src/directplay.c @@ -523,22 +523,6 @@ HRESULT WINAPI SPInit(LPSPINITDATA data) { log_printf(LOG_DEBUG, "SPInit: %p (lpAddress = %p, dwAddressSize = %u)", data->lpISP, data->lpAddress, (unsigned int)(data->dwAddressSize)); - { - struct sp_data *sp_data; - DWORD size; - - HRESULT r = IDirectPlaySP_GetSPData(data->lpISP, (void**)&sp_data, &size, DPGET_LOCAL); - if(r != DP_OK) { - log_printf(LOG_ERROR, "SPInit: GetSPData: %d", r); - return DPERR_UNAVAILABLE; - } - - if(sp_data) { - log_printf(LOG_DEBUG, "SPInit: Already initialised, returning DP_OK"); - return DP_OK; - } - } - struct sp_data sp_data; if(!InitializeCriticalSectionAndSpinCount(&(sp_data.lock), 0x80000000)) {