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
58fdd892
Commit
58fdd892
authored
Nov 14, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Nov 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the setting of the result pointer to NULL in creates, tests
show that windows doesn't set the result to NULL on error.
parent
63e5d5e5
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
56 additions
and
56 deletions
+56
-56
cubetexture.c
dlls/d3d9/cubetexture.c
+2
-2
device.c
dlls/d3d9/device.c
+3
-3
indexbuffer.c
dlls/d3d9/indexbuffer.c
+4
-4
pixelshader.c
dlls/d3d9/pixelshader.c
+14
-13
query.c
dlls/d3d9/query.c
+3
-3
stateblock.c
dlls/d3d9/stateblock.c
+2
-3
swapchain.c
dlls/d3d9/swapchain.c
+2
-3
texture.c
dlls/d3d9/texture.c
+5
-5
vertexbuffer.c
dlls/d3d9/vertexbuffer.c
+4
-4
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+10
-9
vertexshader.c
dlls/d3d9/vertexshader.c
+3
-3
volumetexture.c
dlls/d3d9/volumetexture.c
+4
-4
No files found.
dlls/d3d9/cubetexture.c
View file @
58fdd892
...
...
@@ -256,7 +256,6 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
if
(
NULL
==
object
)
{
FIXME
(
"(%p) allocation of CubeTexture failed
\n
"
,
This
);
*
ppCubeTexture
=
NULL
;
return
D3DERR_OUTOFVIDEOMEMORY
;
}
object
->
lpVtbl
=
&
Direct3DCubeTexture9_Vtbl
;
...
...
@@ -266,12 +265,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface,
D3D9CB_CreateSurface
);
if
(
hr
!=
D3D_OK
){
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateCubeTexture failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppCubeTexture
=
NULL
;
}
else
{
*
ppCubeTexture
=
(
LPDIRECT3DCUBETEXTURE9
)
object
;
TRACE
(
"(%p) : Created cube texture %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) returning %p
\n
"
,
This
,
*
ppCubeTexture
);
...
...
dlls/d3d9/device.c
View file @
58fdd892
...
...
@@ -260,7 +260,6 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DSurface9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppSurface
=
NULL
;
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -272,13 +271,14 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT
hrc
=
IWineD3DDevice_CreateSurface
(
This
->
WineD3DDevice
,
Width
,
Height
,
Format
,
Lockable
,
Discard
,
Level
,
&
object
->
wineD3DSurface
,
Type
,
Usage
,
Pool
,
MultiSample
,
MultisampleQuality
,
pSharedHandle
,(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
||
NULL
==
object
->
wineD3DSurface
)
{
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateSurface failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppSurface
=
NULL
;
}
else
{
TRACE
(
"(%p) : Created surface %p
\n
"
,
This
,
object
);
*
ppSurface
=
(
LPDIRECT3DSURFACE9
)
object
;
}
}
return
hrc
;
}
...
...
dlls/d3d9/indexbuffer.c
View file @
58fdd892
...
...
@@ -166,8 +166,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
/* Allocate the storage for the device */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppIndexBuffer
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -176,12 +175,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface,
TRACE
(
"Calling wined3d create index buffer
\n
"
);
hrc
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
WineD3DDevice
,
Length
,
Usage
,
Format
,
Pool
,
&
object
->
wineD3DIndexBuffer
,
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateIndexBuffer failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppIndexBuffer
=
NULL
;
}
else
{
*
ppIndexBuffer
=
(
LPDIRECT3DINDEXBUFFER9
)
object
;
TRACE
(
"(%p) : Created index buffer %p
\n
"
,
This
,
object
);
}
return
hrc
;
}
dlls/d3d9/pixelshader.c
View file @
58fdd892
...
...
@@ -101,29 +101,30 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(LPDIRECT3DDEVICE9 iface, C
HRESULT
hrc
=
D3D_OK
;
FIXME
(
"(%p) Relay (disabled)
\n
"
,
This
);
*
ppShader
=
NULL
;
return
D3D_OK
;
if
(
ppShader
==
NULL
)
{
TRACE
(
"(%p) Invalid call
\n
"
,
This
);
return
D3DERR_INVALIDCALL
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
E_OUTOFMEMORY
;
}
else
{
}
object
->
ref
=
1
;
object
->
lpVtbl
=
&
Direct3DPixelShader9_Vtbl
;
hrc
=
IWineD3DDevice_CreatePixelShader
(
This
->
WineD3DDevice
,
pFunction
,
&
object
->
wineD3DPixelShader
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
FIXME
(
"(%p) call to IWineD3DDevice_CreatePixelShader failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppShader
=
NULL
;
}
else
{
*
ppShader
=
(
IDirect3DPixelShader9
*
)
object
;
}
object
->
ref
=
1
;
object
->
lpVtbl
=
&
Direct3DPixelShader9_Vtbl
;
hrc
=
IWineD3DDevice_CreatePixelShader
(
This
->
WineD3DDevice
,
pFunction
,
&
object
->
wineD3DPixelShader
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreatePixelShader failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
}
else
{
*
ppShader
=
(
IDirect3DPixelShader9
*
)
object
;
TRACE
(
"(%p) : Created pixel shader %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppShader
);
...
...
dlls/d3d9/query.c
View file @
58fdd892
...
...
@@ -131,8 +131,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUER
/* Allocate the storage for the device */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DQuery9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppQuery
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -141,12 +140,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9 iface, D3DQUER
hr
=
IWineD3DDevice_CreateQuery
(
This
->
WineD3DDevice
,
Type
,
&
object
->
wineD3DQuery
,
(
IUnknown
*
)
object
);
if
(
FAILED
(
hr
))
{
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateQuery failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppQuery
=
NULL
;
}
else
{
*
ppQuery
=
(
LPDIRECT3DQUERY9
)
object
;
TRACE
(
"(%p) : Created query %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) : returning %lx
\n
"
,
This
,
hr
);
return
hr
;
...
...
dlls/d3d9/stateblock.c
View file @
58fdd892
...
...
@@ -106,7 +106,6 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DStateBlock9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"(%p) Failed to allocate %d bytes
\n
"
,
This
,
sizeof
(
IDirect3DStateBlock9Impl
));
*
ppStateBlock
=
NULL
;
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
Direct3DStateBlock9_Vtbl
;
...
...
@@ -116,11 +115,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9 iface, D3
if
(
hrc
!=
D3D_OK
){
FIXME
(
"(%p) Call to IWineD3DDevice_CreateStateBlock failed.
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppStateBlock
=
NULL
;
}
else
{
*
ppStateBlock
=
(
IDirect3DStateBlock9
*
)
object
;
TRACE
(
"(%p) : Created stateblock %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) returning token (ptr to stateblock) of %p
\n
"
,
This
,
object
);
TRACE
(
"(%p) returning token (ptr to stateblock) of %p
\n
"
,
This
,
object
);
return
hrc
;
}
...
...
dlls/d3d9/swapchain.c
View file @
58fdd892
...
...
@@ -151,8 +151,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
pSwapChain
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
object
->
ref
=
1
;
...
...
@@ -179,9 +178,9 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE
if
(
hrc
!=
D3D_OK
)
{
FIXME
(
"(%p) call to IWineD3DDevice_CreateAdditionalSwapChain failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
pSwapChain
=
NULL
;
}
else
{
*
pSwapChain
=
(
IDirect3DSwapChain9
*
)
object
;
TRACE
(
"(%p) : Created swapchain %p
\n
"
,
This
,
*
pSwapChain
);
}
TRACE
(
"(%p) returning %p
\n
"
,
This
,
*
pSwapChain
);
return
hrc
;
...
...
dlls/d3d9/texture.c
View file @
58fdd892
...
...
@@ -248,8 +248,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DTexture9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppTexture
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -259,14 +258,15 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN
(
WINED3DFORMAT
)
Format
,
Pool
,
&
object
->
wineD3DTexture
,
pSharedHandle
,
(
IUnknown
*
)
object
,
D3D9CB_CreateSurface
);
if
(
FAILED
(
hrc
))
{
/* free up object */
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateTexture failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppTexture
=
NULL
;
}
else
{
*
ppTexture
=
(
LPDIRECT3DTEXTURE9
)
object
;
TRACE
(
"(%p) Created Texture %p, %p
\n
"
,
This
,
object
,
object
->
wineD3DTexture
);
}
TRACE
(
"(%p) Created Texture %p, %p
\n
"
,
This
,
object
,
object
->
wineD3DTexture
);
return
hrc
;
}
dlls/d3d9/vertexbuffer.c
View file @
58fdd892
...
...
@@ -166,8 +166,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface,
/* Allocate the storage for the device */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DVertexBuffer9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppVertexBuffer
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -176,11 +175,12 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface,
hrc
=
IWineD3DDevice_CreateVertexBuffer
(
This
->
WineD3DDevice
,
Size
,
Usage
,
FVF
,
Pool
,
&
(
object
->
wineD3DVertexBuffer
),
pSharedHandle
,
(
IUnknown
*
)
object
);
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateVertexBuffer failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppVertexBuffer
=
NULL
;
}
else
{
TRACE
(
"(%p) : Created vertex buffer %p
\n
"
,
This
,
object
);
*
ppVertexBuffer
=
(
LPDIRECT3DVERTEXBUFFER9
)
object
;
}
return
hrc
;
...
...
dlls/d3d9/vertexdeclaration.c
View file @
58fdd892
...
...
@@ -109,14 +109,14 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9
TRACE
(
"(%p) : Relay
\n
"
,
iface
);
if
(
NULL
==
ppDecl
)
{
return
D3DERR_INVALIDCALL
;
WARN
(
"(%p) : Caller passed NULL As ppDecl, returning D3DERR_INVALIDCALL"
,
This
);
return
D3DERR_INVALIDCALL
;
}
/* Allocate the storage for the device */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DVertexDeclaration9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppDecl
=
NULL
;
return
D3DERR_OUTOFVIDEOMEMORY
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
object
->
lpVtbl
=
&
Direct3DVertexDeclaration9_Vtbl
;
...
...
@@ -124,12 +124,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9
hr
=
IWineD3DDevice_CreateVertexDeclaration
(
This
->
WineD3DDevice
,
pVertexElements
,
&
object
->
wineD3DVertexDeclaration
,
(
IUnknown
*
)
object
);
if
(
FAILED
(
hr
))
{
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateVertexDeclaration failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppDecl
=
NULL
;
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateVertexDeclaration failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
)
;
}
else
{
*
ppDecl
=
(
LPDIRECT3DVERTEXDECLARATION9
)
object
;
*
ppDecl
=
(
LPDIRECT3DVERTEXDECLARATION9
)
object
;
TRACE
(
"(%p) : Created vertex declatanio %p
\n
"
,
This
,
object
);
}
return
hr
;
}
...
...
dlls/d3d9/vertexshader.c
View file @
58fdd892
...
...
@@ -108,8 +108,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9 iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
TRACE
(
"(%p) : pFunction(%p), ppShader(%p)
\n
"
,
This
,
pFunction
,
ppShader
);
if
(
NULL
==
object
)
{
FIXME
(
"Allocation of memory failed
\n
"
);
*
ppShader
=
NULL
;
FIXME
(
"Allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -118,12 +117,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9 iface,
hrc
=
IWineD3DDevice_CreateVertexShader
(
This
->
WineD3DDevice
,
pFunction
,
&
object
->
wineD3DVertexShader
,
(
IUnknown
*
)
object
);
if
(
FAILED
(
hrc
))
{
/* free up object */
FIXME
(
"Call to IWineD3DDevice_CreateVertexShader failed
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppShader
=
NULL
;
}
else
{
*
ppShader
=
(
IDirect3DVertexShader9
*
)
object
;
TRACE
(
"(%p) : Created vertex shader %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppShader
);
...
...
dlls/d3d9/volumetexture.c
View file @
58fdd892
...
...
@@ -250,8 +250,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
/* Allocate the storage for the device */
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirect3DVolumeTexture9Impl
));
if
(
NULL
==
object
)
{
FIXME
(
"(%p) allocation of memory failed
\n
"
,
This
);
*
ppVolumeTexture
=
NULL
;
FIXME
(
"(%p) allocation of memory failed, returning D3DERR_OUTOFVIDEOMEMORY
\n
"
,
This
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -263,12 +262,13 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac
if
(
hrc
!=
D3D_OK
)
{
/* free up object */
/* free up object */
FIXME
(
"(%p) call to IWineD3DDevice_CreateVolumeTexture failed
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppVolumeTexture
=
NULL
;
}
else
{
*
ppVolumeTexture
=
(
LPDIRECT3DVOLUMETEXTURE9
)
object
;
TRACE
(
"(%p) : Created volume texture %p
\n
"
,
This
,
object
);
}
TRACE
(
"(%p) returning %p
\n
"
,
This
,
*
ppVolumeTexture
);
return
hrc
;
...
...
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