From caaedcff2b7739cd2a3f6e70cb1a43dadb780bd1 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 29 Feb 2016 14:01:39 +0100 Subject: [PATCH] Added patch to set DSCAPS_CERTIFIED flags in dsound. --- ...Pretend-that-our-driver-is-certified.patch | 42 +++++++++++++++++++ patches/dsound-DSCAPS_CERTIFIED/definition | 1 + patches/patchinstall.sh | 16 +++++++ 3 files changed, 59 insertions(+) create mode 100644 patches/dsound-DSCAPS_CERTIFIED/0001-dsound-Pretend-that-our-driver-is-certified.patch create mode 100644 patches/dsound-DSCAPS_CERTIFIED/definition diff --git a/patches/dsound-DSCAPS_CERTIFIED/0001-dsound-Pretend-that-our-driver-is-certified.patch b/patches/dsound-DSCAPS_CERTIFIED/0001-dsound-Pretend-that-our-driver-is-certified.patch new file mode 100644 index 00000000..c5b78214 --- /dev/null +++ b/patches/dsound-DSCAPS_CERTIFIED/0001-dsound-Pretend-that-our-driver-is-certified.patch @@ -0,0 +1,42 @@ +From 3af51650f1b1dae29edd145610b2698780674ab2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Mon, 29 Feb 2016 13:55:20 +0100 +Subject: dsound: Pretend that our driver is certified. + +--- + dlls/dsound/dsound.c | 3 +++ + dlls/dsound/tests/dsound.c | 4 ++++ + 2 files changed, 7 insertions(+) + +diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c +index ccefd1f..fa36d3f 100644 +--- a/dlls/dsound/dsound.c ++++ b/dlls/dsound/dsound.c +@@ -371,6 +371,9 @@ static HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGU + device->drvcaps.dwFlags |= DSCAPS_SECONDARYMONO | DSCAPS_SECONDARYSTEREO; + device->drvcaps.dwFlags |= DSCAPS_CONTINUOUSRATE; + ++ /* the driver is certified */ ++ device->drvcaps.dwFlags |= DSCAPS_CERTIFIED; ++ + device->drvcaps.dwPrimaryBuffers = 1; + device->drvcaps.dwMinSecondarySampleRate = DSBFREQUENCY_MIN; + device->drvcaps.dwMaxSecondarySampleRate = DSBFREQUENCY_MAX; +diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c +index 78364ed..8449ed7 100644 +--- a/dlls/dsound/tests/dsound.c ++++ b/dlls/dsound/tests/dsound.c +@@ -129,6 +129,10 @@ static void IDirectSound_test(LPDIRECTSOUND dso, BOOL initialized, + rc=IDirectSound_GetCaps(dso,&dscaps); + ok(rc==DS_OK,"IDirectSound_GetCaps() failed: %08x\n",rc); + ++ /* All modern WDM drivers are 'certified' */ ++ ok(dscaps.dwFlags & DSCAPS_CERTIFIED, "Expected driver to have " ++ "DSCAPS_CERTIFIED flag set\n"); ++ + rc=IDirectSound_Compact(dso); + ok(rc==DSERR_PRIOLEVELNEEDED,"IDirectSound_Compact() failed: %08x\n", rc); + +-- +2.7.1 + diff --git a/patches/dsound-DSCAPS_CERTIFIED/definition b/patches/dsound-DSCAPS_CERTIFIED/definition new file mode 100644 index 00000000..0f5d215e --- /dev/null +++ b/patches/dsound-DSCAPS_CERTIFIED/definition @@ -0,0 +1 @@ +Fixes: Set DSCAPS_CERTIFIED flags in dsound diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 20859072..0e8f49e0 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -136,6 +136,7 @@ patch_enable_all () enable_ddraw_d3d_execute_buffer="$1" enable_dinput_DIPROP_USERNAME="$1" enable_dinput_Initialize="$1" + enable_dsound_DSCAPS_CERTIFIED="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dsound_Revert_Cleanup="$1" @@ -562,6 +563,9 @@ patch_enable () dinput-Initialize) enable_dinput_Initialize="$2" ;; + dsound-DSCAPS_CERTIFIED) + enable_dsound_DSCAPS_CERTIFIED="$2" + ;; dsound-EAX) enable_dsound_EAX="$2" ;; @@ -3445,6 +3449,18 @@ if test "$enable_dinput_Initialize" -eq 1; then ) >> "$patchlist" fi +# Patchset dsound-DSCAPS_CERTIFIED +# | +# | Modified files: +# | * dlls/dsound/dsound.c, dlls/dsound/tests/dsound.c +# | +if test "$enable_dsound_DSCAPS_CERTIFIED" -eq 1; then + patch_apply dsound-DSCAPS_CERTIFIED/0001-dsound-Pretend-that-our-driver-is-certified.patch + ( + echo '+ { "Michael Müller", "dsound: Pretend that our driver is certified.", 1 },'; + ) >> "$patchlist" +fi + # Patchset dsound-Fast_Mixer # | # | This patchset fixes the following Wine bugs: