[DSOUND] little patch
reif at earthlink.net
Thu Mar 10 20:40:10 CST 2005
> - try to have better match caps with hw caps so games can active more hw
>- This->lock.DebugInfo->Spare = 0;
>+ /*This->lock.DebugInfo->Spare = 0;*/
You have to zero this out or DeleteCriticalSection will try
to delete that static memory.
>+ if (pDS->drvcaps.dwFlags | DSCAPS_PRIMARYMONO) pDS->pwfx->nChannels = 1;
>+ if (pDS->drvcaps.dwFlags | DSCAPS_PRIMARY16BIT) pDS->pwfx->wBitsPerSample = 16;
>+ pDS->pwfx->nBlockAlign = pDS->pwfx->wBitsPerSample * pDS->pwfx->nChannels / 8;
>+ pDS->pwfx->nAvgBytesPerSec = pDS->pwfx->nSamplesPerSec * pDS->pwfx->nBlockAlign;
You can't do this and be compatible with windows.
You can't include this more than once because there is only one .h file
so it's not really necessary.
>+#define WINE_SET_CS_NAME(cs, name) (cs)->DebugInfo->Spare = (DWORD) name
>+#define WINE_GET_CS_NAME(cs) (const char*) (cs)->lock.DebugInfo->Spare
This is a wine specific trick and should probably be put somewhere global so
all users can be consistent. The name should have DEBUG in it somewhere.
More information about the wine-patches