* dinput.h (DIEDFL_ATTACHEDONLY): fix constant as 0x1
* dsound.h (DSBFREQUENCY_MAX): Define as 200000 only for version 9 and
  newer, but as 100000 for anything older.
  (DSBUFFERDESC): The guid3DAlgorithm member is available only with v7
  and newer.
  (DSCBUFFERDESC): The dwFXCount and lpDSCFXDesc members are available
  only with v8 and newer.

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@4769 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/direct-x/include/dinput.h b/mingw-w64-headers/direct-x/include/dinput.h
index 2d64d07..4d606bd 100644
--- a/mingw-w64-headers/direct-x/include/dinput.h
+++ b/mingw-w64-headers/direct-x/include/dinput.h
@@ -205,7 +205,7 @@
 #define DIENUM_CONTINUE                 1
 
 #define DIEDFL_ALLDEVICES               0x00000000
-#define DIEDFL_ATTACHEDONLY             0x00000000
+#define DIEDFL_ATTACHEDONLY             0x00000001
 #define DIEDFL_FORCEFEEDBACK            0x00000100
 #define DIEDFL_INCLUDEALIASES           0x00010000
 #define DIEDFL_INCLUDEPHANTOMS          0x00020000
diff --git a/mingw-w64-headers/direct-x/include/dsound.h b/mingw-w64-headers/direct-x/include/dsound.h
index a5e8f83..763e412 100644
--- a/mingw-w64-headers/direct-x/include/dsound.h
+++ b/mingw-w64-headers/direct-x/include/dsound.h
@@ -231,7 +231,11 @@
 #define DSBVOLUME_MAX                    0
 #define DSBVOLUME_MIN               -10000
 #define DSBFREQUENCY_MIN            100
+#if (DIRECTSOUND_VERSION >= 0x0900)
 #define DSBFREQUENCY_MAX            200000
+#else
+#define DSBFREQUENCY_MAX            100000
+#endif
 #define DSBFREQUENCY_ORIGINAL       0
 
 #define DSBNOTIFICATIONS_MAX        100000U
@@ -292,7 +296,9 @@
     DWORD		dwBufferBytes;
     DWORD		dwReserved;
     LPWAVEFORMATEX	lpwfxFormat;
+#if (DIRECTSOUND_VERSION >= 0x0700)
     GUID		guid3DAlgorithm;
+#endif /* DS7 */
 } DSBUFFERDESC,*LPDSBUFFERDESC;
 typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
 
@@ -361,8 +367,10 @@
   DWORD           dwBufferBytes;
   DWORD           dwReserved;
   LPWAVEFORMATEX  lpwfxFormat;
+#if (DIRECTSOUND_VERSION >= 0x0800)
   DWORD           dwFXCount;
   LPDSCEFFECTDESC lpDSCFXDesc;
+#endif /* DS8 */
 } DSCBUFFERDESC, *LPDSCBUFFERDESC;
 typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;