Added patch to set DSCAPS_CERTIFIED flags in dsound.

This commit is contained in:
Sebastian Lackner 2016-02-29 14:01:39 +01:00
parent d5ebadd0d9
commit caaedcff2b
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From 3af51650f1b1dae29edd145610b2698780674ab2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
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

View File

@ -0,0 +1 @@
Fixes: Set DSCAPS_CERTIFIED flags in dsound

View File

@ -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: