Fix build for MSVC.

This commit is contained in:
edorax 2017-02-11 23:11:32 +08:00
parent c02c448f47
commit fee89f1967
1 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,8 @@ bool DirectSound::init(long sampleRate)
void DirectSound::pause()
{
for (auto buf : {dsbPrimary, dsbSecondary}) {
LPDIRECTSOUNDBUFFER bufs[] = {dsbPrimary, dsbSecondary};
for (auto buf : bufs) {
if (buf == NULL)
continue;
@ -216,7 +217,8 @@ void DirectSound::reset()
void DirectSound::resume()
{
for (auto buf : {dsbPrimary, dsbSecondary}) {
LPDIRECTSOUNDBUFFER bufs[] = {dsbPrimary, dsbSecondary};
for (auto buf : bufs) {
if (buf == NULL)
return;