Primary buffer toggle no longer a dummy.

This commit is contained in:
n-a-c-h
2005-02-09 03:10:26 +00:00
parent a3f6f3e5eb
commit a92878a626

View File

@@ -731,6 +731,7 @@ int RegisterWinClass(void)
BYTE PrevStereoSound; BYTE PrevStereoSound;
DWORD PrevSoundQuality; DWORD PrevSoundQuality;
extern unsigned char PrimaryBuffer;
BOOL InitSound() BOOL InitSound()
{ {
@@ -748,12 +749,24 @@ BOOL InitSound()
{ {
lpDirectSound->Initialize(NULL); lpDirectSound->Initialize(NULL);
if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_NORMAL)) //DSSCL_WRITEPRIMARY, fix this StatMat - make a toggle if (PrimaryBuffer)
{
if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_WRITEPRIMARY))
{ {
if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_EXCLUSIVE)) if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_EXCLUSIVE))
return FALSE; return FALSE;
} }
else UsePrimaryBuffer=0; //1, fix this StatMat - make a toggle else UsePrimaryBuffer=1;
}
else
{
if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_NORMAL))
{
if (DS_OK != lpDirectSound->SetCooperativeLevel(hMainWindow, DSSCL_EXCLUSIVE))
return FALSE;
}
else UsePrimaryBuffer=0;
}
} }
else else
{ {