DSoundHelpers: use sizeof(DSBUFFERDESC) rather than sizeof(variable)
Microsoft documentation and samples always use sizeof(DSBUFFERDESC), not sizeof(variable).
This commit is contained in:
@@ -45,7 +45,7 @@ void DSound::SetPrimaryBufferMode()
|
|||||||
{
|
{
|
||||||
DSBUFFERDESC format;
|
DSBUFFERDESC format;
|
||||||
memset( &format, 0, sizeof(format) );
|
memset( &format, 0, sizeof(format) );
|
||||||
format.dwSize = sizeof(format);
|
format.dwSize = sizeof(DSBUFFERDESC);
|
||||||
format.dwFlags = DSBCAPS_PRIMARYBUFFER;
|
format.dwFlags = DSBCAPS_PRIMARYBUFFER;
|
||||||
format.dwBufferBytes = 0;
|
format.dwBufferBytes = 0;
|
||||||
format.lpwfxFormat = nullptr;
|
format.lpwfxFormat = nullptr;
|
||||||
@@ -219,7 +219,7 @@ RString DSoundBuf::Init( DSound &ds, DSoundBuf::hw hardware,
|
|||||||
/* Try to create the secondary buffer */
|
/* Try to create the secondary buffer */
|
||||||
DSBUFFERDESC format;
|
DSBUFFERDESC format;
|
||||||
memset( &format, 0, sizeof(format) );
|
memset( &format, 0, sizeof(format) );
|
||||||
format.dwSize = sizeof(format);
|
format.dwSize = sizeof(DSBUFFERDESC);
|
||||||
|
|
||||||
if (IsWindowsVistaOrGreater())
|
if (IsWindowsVistaOrGreater())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user