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
17dacf90
Commit
17dacf90
authored
May 11, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
May 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix some code unprotected by ddraw lock.
parent
1ecf0c96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
device.c
dlls/ddraw/device.c
+14
-10
No files found.
dlls/ddraw/device.c
View file @
17dacf90
...
...
@@ -2343,8 +2343,6 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%08x,%p)
\n
"
,
This
,
dwRenderStateType
,
lpdwRenderState
);
/* D3DRENDERSTATE_TEXTUREMAPBLEND is mapped to texture state stages in SetRenderState; reverse
the mapping to get the value. */
switch
(
dwRenderStateType
)
{
case
D3DRENDERSTATE_TEXTUREHANDLE
:
...
...
@@ -2355,6 +2353,8 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
IWineD3DBaseTexture
*
tex
=
NULL
;
*
lpdwRenderState
=
0
;
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_GetTexture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
...
...
@@ -2378,11 +2378,15 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
IWineD3DBaseTexture_Release
(
tex
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
case
D3DRENDERSTATE_TEXTUREMAPBLEND
:
{
/* D3DRENDERSTATE_TEXTUREMAPBLEND is mapped to texture state stages in SetRenderState; reverse
the mapping to get the value. */
DWORD
colorop
,
colorarg1
,
colorarg2
;
DWORD
alphaop
,
alphaarg1
,
alphaarg2
;
...
...
@@ -2627,6 +2631,8 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
ICOM_THIS_FROM
(
IDirect3DDeviceImpl
,
IDirect3DDevice3
,
iface
);
TRACE
(
"(%p)->(%08x,%d)
\n
"
,
This
,
RenderStateType
,
Value
);
EnterCriticalSection
(
&
ddraw_cs
);
switch
(
RenderStateType
)
{
case
D3DRENDERSTATE_TEXTUREHANDLE
:
...
...
@@ -2661,8 +2667,6 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
case
D3DRENDERSTATE_TEXTUREMAPBLEND
:
{
EnterCriticalSection
(
&
ddraw_cs
);
This
->
legacyTextureBlending
=
TRUE
;
switch
(
(
D3DTEXTUREBLEND
)
Value
)
...
...
@@ -2748,8 +2752,6 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
ERR
(
"Unhandled texture environment %d !
\n
"
,
Value
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
hr
=
D3D_OK
;
break
;
}
...
...
@@ -2761,6 +2763,8 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
break
;
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -4429,6 +4433,8 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
HRESULT
hr
;
TRACE
(
"(%p)->(%d,%p)
\n
"
,
This
,
Stage
,
tex
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
This
->
legacyTextureBlending
)
IDirect3DDevice3_GetRenderState
(
iface
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
&
texmapblend
);
...
...
@@ -4447,8 +4453,6 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
DDPIXELFORMAT
ddfmt
;
HRESULT
result
;
EnterCriticalSection
(
&
ddraw_cs
);
result
=
IWineD3DDevice_GetTexture
(
This
->
wineD3DDevice
,
0
,
&
tex
);
...
...
@@ -4477,10 +4481,10 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
{
IWineD3DDevice_SetTextureStageState
(
This
->
wineD3DDevice
,
0
,
WINED3DTSS_ALPHAARG1
,
WINED3DTA_CURRENT
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
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