DSoundHelpers: use sizeof(DSBUFFERDESC) rather than sizeof(variable)

Microsoft documentation and samples always use sizeof(DSBUFFERDESC), not sizeof(variable).
This commit is contained in:
sukibaby
2025-06-10 21:38:43 -07:00
committed by teejusb
parent b933347374
commit 8f2076eea1
+2 -2
View File
@@ -45,7 +45,7 @@ void DSound::SetPrimaryBufferMode()
{
DSBUFFERDESC format;
memset( &format, 0, sizeof(format) );
format.dwSize = sizeof(format);
format.dwSize = sizeof(DSBUFFERDESC);
format.dwFlags = DSBCAPS_PRIMARYBUFFER;
format.dwBufferBytes = 0;
format.lpwfxFormat = nullptr;
@@ -219,7 +219,7 @@ RString DSoundBuf::Init( DSound &ds, DSoundBuf::hw hardware,
/* Try to create the secondary buffer */
DSBUFFERDESC format;
memset( &format, 0, sizeof(format) );
format.dwSize = sizeof(format);
format.dwSize = sizeof(DSBUFFERDESC);
if (IsWindowsVistaOrGreater())
{