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
9aab44de
Commit
9aab44de
authored
May 30, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Hold the lock in IDirect3DTexture methods.
parent
6eb8e3fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
texture.c
dlls/ddraw/texture.c
+11
-0
No files found.
dlls/ddraw/texture.c
View file @
9aab44de
...
...
@@ -217,6 +217,7 @@ IDirect3DTextureImpl_GetHandle(IDirect3DTexture2 *iface,
TRACE
(
"(%p)->(%p,%p)
\n
"
,
This
,
d3d
,
lpHandle
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
!
This
->
Handle
)
{
This
->
Handle
=
IDirect3DDeviceImpl_CreateHandle
(
d3d
);
...
...
@@ -230,6 +231,7 @@ IDirect3DTextureImpl_GetHandle(IDirect3DTexture2 *iface,
TRACE
(
" returning handle %08x.
\n
"
,
*
lpHandle
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
}
...
...
@@ -304,6 +306,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
HRESULT
ret_value
=
D3D_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
src_ptr
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(((
src_ptr
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
!=
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
))
||
(
src_ptr
->
surface_desc
.
u2
.
dwMipMapCount
!=
This
->
surface_desc
.
u2
.
dwMipMapCount
))
...
...
@@ -331,6 +334,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if
(
ret_value
!=
D3D_OK
)
{
ERR
(
"IWineD3DSurface::GetPalette failed! This is unexpected
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
if
(
wine_pal
)
...
...
@@ -339,6 +343,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if
(
ret_value
!=
D3D_OK
)
{
ERR
(
"IWineD3DPalette::GetParent failed! This is unexpected
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
pal_impl
=
ICOM_OBJECT
(
IDirectDrawPaletteImpl
,
IDirectDrawPalette
,
pal
);
...
...
@@ -352,6 +357,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if
(
ret_value
!=
D3D_OK
)
{
ERR
(
"IWineD3DSurface::GetPalette failed! This is unexpected
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
if
(
wine_pal_src
)
...
...
@@ -360,6 +366,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if
(
ret_value
!=
D3D_OK
)
{
ERR
(
"IWineD3DPalette::GetParent failed! This is unexpected
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
pal_impl_src
=
ICOM_OBJECT
(
IDirectDrawPaletteImpl
,
IDirectDrawPalette
,
pal_src
);
...
...
@@ -395,6 +402,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
{
/* Should also check for same pixel format, u1.lPitch, ... */
ERR
(
"Error in surface sizes
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
else
...
...
@@ -419,6 +427,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
if
(
ret_value
!=
D3D_OK
)
{
ERR
(
" (%p) Locking the source surface failed
\n
"
,
This
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
...
...
@@ -427,6 +436,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
{
ERR
(
" (%p) Locking the destination surface failed
\n
"
,
This
);
IWineD3DSurface_UnlockRect
(
src_ptr
->
WineD3DSurface
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_TEXTURE_LOAD_FAILED
;
}
...
...
@@ -466,6 +476,7 @@ IDirect3DTextureImpl_Load(IDirect3DTexture2 *iface,
}
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
ret_value
;
}
...
...
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