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
5a48acc6
Commit
5a48acc6
authored
Nov 08, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Nov 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow NULL ppQuery to be passed to CreateQuery.
parent
e2b8b43b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
28 deletions
+31
-28
query.c
dlls/d3d9/query.c
+31
-28
No files found.
dlls/d3d9/query.c
View file @
5a48acc6
...
@@ -119,32 +119,35 @@ const IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl =
...
@@ -119,32 +119,35 @@ const IDirect3DQuery9Vtbl Direct3DQuery9_Vtbl =
/* IDirect3DDevice9 IDirect3DQuery9 Methods follow: */
/* IDirect3DDevice9 IDirect3DQuery9 Methods follow: */
HRESULT
WINAPI
IDirect3DDevice9Impl_CreateQuery
(
LPDIRECT3DDEVICE9
iface
,
D3DQUERYTYPE
Type
,
IDirect3DQuery9
**
ppQuery
)
{
HRESULT
WINAPI
IDirect3DDevice9Impl_CreateQuery
(
LPDIRECT3DDEVICE9
iface
,
D3DQUERYTYPE
Type
,
IDirect3DQuery9
**
ppQuery
)
{
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
IDirect3DDevice9Impl
*
This
=
(
IDirect3DDevice9Impl
*
)
iface
;
IDirect3DQuery9Impl
*
object
=
NULL
;
IDirect3DQuery9Impl
*
object
=
NULL
;
HRESULT
hr
=
D3D_OK
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"(%p) Relay
\n
"
,
This
);
TRACE
(
"(%p) Relay
\n
"
,
This
);
/* Allocate the storage for the device */
if
(
!
ppQuery
)
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DQuery9Impl
));
return
IWineD3DDevice_CreateQuery
(
This
->
WineD3DDevice
,
Type
,
NULL
,
NULL
);
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
/* Allocate the storage for the device */
*
ppQuery
=
NULL
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DQuery9Impl
));
return
D3DERR_OUTOFVIDEOMEMORY
;
if
(
NULL
==
object
)
{
}
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppQuery
=
NULL
;
object
->
lpVtbl
=
&
Direct3DQuery9_Vtbl
;
return
D3DERR_OUTOFVIDEOMEMORY
;
object
->
ref
=
1
;
}
hr
=
IWineD3DDevice_CreateQuery
(
This
->
WineD3DDevice
,
Type
,
&
(
object
->
wineD3DQuery
),
(
IUnknown
*
)
object
);
object
->
lpVtbl
=
&
Direct3DQuery9_Vtbl
;
if
(
FAILED
(
hr
))
{
object
->
ref
=
1
;
/* free up object */
hr
=
IWineD3DDevice_CreateQuery
(
This
->
WineD3DDevice
,
Type
,
&
object
->
wineD3DQuery
,
(
IUnknown
*
)
object
);
FIXME
(
"(%p) call to IWineD3DDevice_CreateQuery failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
if
(
FAILED
(
hr
))
{
*
ppQuery
=
NULL
;
/* free up object */
}
else
{
FIXME
(
"(%p) call to IWineD3DDevice_CreateQuery failed
\n
"
,
This
);
*
ppQuery
=
(
LPDIRECT3DQUERY9
)
object
;
HeapFree
(
GetProcessHeap
(),
0
,
object
);
}
*
ppQuery
=
NULL
;
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppQuery
);
}
else
{
return
hr
;
*
ppQuery
=
(
LPDIRECT3DQUERY9
)
object
;
}
TRACE
(
"(%p) : returning %lx
\n
"
,
This
,
hr
);
return
hr
;
}
}
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