Fixed up the Debug/Release NoDX configurations

This commit is contained in:
tomcw 2019-09-01 11:28:24 +01:00
parent 9a061e271f
commit 2f6b24b970
2 changed files with 17 additions and 1 deletions

View file

@ -226,10 +226,15 @@ void DSReleaseSoundBuffer(VOICE* pVoice)
bool DSZeroVoiceBuffer(PVOICE Voice, char* pszDevName, DWORD dwBufferSize) bool DSZeroVoiceBuffer(PVOICE Voice, char* pszDevName, DWORD dwBufferSize)
{ {
#ifdef NO_DIRECT_X
return false;
#else
DWORD dwDSLockedBufferSize = 0; // Size of the locked DirectSound buffer DWORD dwDSLockedBufferSize = 0; // Size of the locked DirectSound buffer
SHORT* pDSLockedBuffer; SHORT* pDSLockedBuffer;
HRESULT hr = Voice->lpDSBvoice->Stop(); HRESULT hr = Voice->lpDSBvoice->Stop();
if(FAILED(hr)) if(FAILED(hr))
{ {
@ -262,6 +267,7 @@ bool DSZeroVoiceBuffer(PVOICE Voice, char* pszDevName, DWORD dwBufferSize)
} }
return true; return true;
#endif // NO_DIRECT_X
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -599,7 +599,11 @@ void VideoRefreshScreen ( uint32_t uRedrawWholeScreenVideoMode /* =0*/, bool bRe
SRCCOPY); SRCCOPY);
} }
#ifdef NO_DIRECT_X
#else
//if (g_lpDD) g_lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL); //if (g_lpDD) g_lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, NULL);
#endif // NO_DIRECT_X
GdiFlush(); GdiFlush();
} }
@ -909,6 +913,11 @@ static BOOL CALLBACK DDEnumProc(LPGUID lpGUID, LPCTSTR lpszDesc, LPCTSTR lpszDrv
bool DDInit(void) bool DDInit(void)
{ {
#ifdef NO_DIRECT_X
return false;
#else
HRESULT hr = DirectDrawEnumerate((LPDDENUMCALLBACK)DDEnumProc, NULL); HRESULT hr = DirectDrawEnumerate((LPDDENUMCALLBACK)DDEnumProc, NULL);
if (FAILED(hr)) if (FAILED(hr))
{ {
@ -939,6 +948,7 @@ bool DDInit(void)
} }
return true; return true;
#endif // NO_DIRECT_X
} }
// From SoundCore.h // From SoundCore.h