From 318c2d4f6ff574448e219fa4ef52061aa690915f Mon Sep 17 00:00:00 2001 From: "kaetemi@users.sourceforge.net" Date: Fri, 7 May 2010 10:39:42 +0200 Subject: [PATCH] Fixed: Availability of DirectSound 8 functions differs between versions. --- code/ryzom/tools/client/client_config/display_dlg.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/client_config/display_dlg.cpp b/code/ryzom/tools/client/client_config/display_dlg.cpp index ad699b463..b0989c91b 100644 --- a/code/ryzom/tools/client/client_config/display_dlg.cpp +++ b/code/ryzom/tools/client/client_config/display_dlg.cpp @@ -219,9 +219,17 @@ bool GetHardwareSoundBuffer () HardwareSoundBuffer = 0; // The DirectSound object - LPDIRECTSOUND8 _DirectSound; +#if (DIRECTSOUND_VERSION >= 0x0800) + LPDIRECTSOUND8 _DirectSound; +#else + LPDIRECTSOUND _DirectSound; +#endif +#if (DIRECTSOUND_VERSION >= 0x0800) if (DirectSoundCreate8(NULL, &_DirectSound, NULL) == DS_OK) +#else + if (DirectSoundCreate(NULL, &_DirectSound, NULL) == DS_OK) +#endif { DSCAPS caps; memset (&caps, 0, sizeof (DSCAPS));