keep xp on life support a bit longer, check for vista+ stuff (#1456)

This commit is contained in:
Chris Pable
2017-05-25 00:34:33 -07:00
committed by Colby Klein
parent c5f51d1e5a
commit 55281cebd2
4 changed files with 58 additions and 5 deletions
+9 -1
View File
@@ -210,7 +210,15 @@ RString DSoundBuf::Init( DSound &ds, DSoundBuf::hw hardware,
DSBUFFERDESC format;
memset( &format, 0, sizeof(format) );
format.dwSize = sizeof(format);
format.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLVOLUME;
if (at_least_vista())
{
format.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLVOLUME | DSBCAPS_TRUEPLAYPOSITION;
}
else
{
format.dwFlags = DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS | DSBCAPS_CTRLVOLUME;
}
/* Don't use DSBCAPS_STATIC. It's meant for static buffers, and we
* only use streaming buffers. */