From fee89f1967ee0de4dbe158bef00246402947c22d Mon Sep 17 00:00:00 2001 From: edorax Date: Sat, 11 Feb 2017 23:11:32 +0800 Subject: [PATCH] Fix build for MSVC. --- src/wx/dsound.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wx/dsound.cpp b/src/wx/dsound.cpp index 0c11dceb..a6fb1831 100644 --- a/src/wx/dsound.cpp +++ b/src/wx/dsound.cpp @@ -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;