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

View File

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