Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bf263a34
Commit
bf263a34
authored
Jun 14, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Jun 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Fail if app requests 3D buffer interface on a non-3D buffer.
parent
06b57327
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
buffer.c
dlls/dsound/buffer.c
+4
-0
ds3d.c
dlls/dsound/tests/ds3d.c
+9
-1
No files found.
dlls/dsound/buffer.c
View file @
bf263a34
...
...
@@ -764,9 +764,13 @@ static HRESULT WINAPI IDirectSoundBufferImpl_QueryInterface(IDirectSoundBuffer8
}
if
(
IsEqualGUID
(
&
IID_IDirectSound3DBuffer
,
riid
)
)
{
if
(
This
->
dsbd
.
dwFlags
&
DSBCAPS_CTRL3D
){
IDirectSound3DBuffer_AddRef
(
&
This
->
IDirectSound3DBuffer_iface
);
*
ppobj
=
&
This
->
IDirectSound3DBuffer_iface
;
return
S_OK
;
}
TRACE
(
"app requested IDirectSound3DBuffer on non-3D secondary buffer
\n
"
);
return
E_NOINTERFACE
;
}
if
(
IsEqualGUID
(
&
IID_IDirectSound3DListener
,
riid
)
)
{
...
...
dlls/dsound/tests/ds3d.c
View file @
bf263a34
...
...
@@ -801,7 +801,7 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
ZeroMemory
(
&
bufdesc
,
sizeof
(
bufdesc
));
bufdesc
.
dwSize
=
sizeof
(
bufdesc
);
bufdesc
.
dwFlags
=
DSBCAPS_GETCURRENTPOSITION2
;
if
(
has_3d
)
if
(
has_3d
buffer
)
bufdesc
.
dwFlags
|=
DSBCAPS_CTRL3D
;
else
bufdesc
.
dwFlags
|=
...
...
@@ -833,6 +833,14 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
wfx
.
nSamplesPerSec
,
wfx
.
wBitsPerSample
,
wfx
.
nChannels
,
getDSBCAPS
(
bufdesc
.
dwFlags
),
rc
);
if
(
rc
==
DS_OK
&&
secondary
!=
NULL
)
{
IDirectSound3DBuffer
*
ds3d
;
rc
=
IDirectSoundBuffer_QueryInterface
(
secondary
,
&
IID_IDirectSound3DBuffer
,
(
void
**
)
&
ds3d
);
ok
((
has_3dbuffer
&&
rc
==
DS_OK
)
||
(
!
has_3dbuffer
&&
rc
==
E_NOINTERFACE
),
"Wrong return trying to get 3D buffer on %s3D secondary interface: %08x
\n
"
,
has_3dbuffer
?
""
:
"non-"
,
rc
);
if
(
rc
==
DS_OK
)
IDirectSound3DBuffer_Release
(
ds3d
);
if
(
!
has_3d
)
{
LONG
refvol
,
vol
,
refpan
,
pan
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment