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
ca7e56cf
Commit
ca7e56cf
authored
Mar 30, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: D3DLIGHT lights default to active.
Actually, there is no way to deactivate them short of removing them from the viewport.
parent
efe777c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
light.c
dlls/ddraw/light.c
+5
-4
No files found.
dlls/ddraw/light.c
View file @
ca7e56cf
...
...
@@ -81,7 +81,6 @@ void light_deactivate(struct d3d_light *light)
if
(
!
light
->
active_viewport
||
!
light
->
active_viewport
->
active_device
)
return
;
device
=
light
->
active_viewport
->
active_device
;
/* If was not active, activate it */
if
(
light
->
light
.
dwFlags
&
D3DLIGHT_ACTIVE
)
{
IDirect3DDevice7_LightEnable
(
&
device
->
IDirect3DDevice7_iface
,
light
->
dwLightIndex
,
FALSE
);
...
...
@@ -171,6 +170,7 @@ static const float zero_value[] = {
static
HRESULT
WINAPI
d3d_light_SetLight
(
IDirect3DLight
*
iface
,
D3DLIGHT
*
data
)
{
struct
d3d_light
*
light
=
impl_from_IDirect3DLight
(
iface
);
DWORD
flags
=
data
->
dwSize
>=
sizeof
(
D3DLIGHT2
)
?
((
D3DLIGHT2
*
)
data
)
->
dwFlags
:
D3DLIGHT_ACTIVE
;
D3DLIGHT7
*
light7
=
&
light
->
light7
;
TRACE
(
"iface %p, data %p.
\n
"
,
iface
,
data
);
...
...
@@ -184,7 +184,7 @@ static HRESULT WINAPI d3d_light_SetLight(IDirect3DLight *iface, D3DLIGHT *data)
/* Translate D3DLIGHT2 structure to D3DLIGHT7. */
light7
->
dltType
=
data
->
dltType
;
light7
->
dcvDiffuse
=
data
->
dcvColor
;
if
(
data
->
dwSize
>=
sizeof
(
D3DLIGHT2
)
&&
(((
D3DLIGHT2
*
)
data
)
->
dwF
lags
&
D3DLIGHT_NO_SPECULAR
))
if
(
!
(
f
lags
&
D3DLIGHT_NO_SPECULAR
))
light7
->
dcvSpecular
=
data
->
dcvColor
;
else
light7
->
dcvSpecular
=
*
(
const
D3DCOLORVALUE
*
)
zero_value
;
...
...
@@ -200,9 +200,10 @@ static HRESULT WINAPI d3d_light_SetLight(IDirect3DLight *iface, D3DLIGHT *data)
light7
->
dvPhi
=
data
->
dvPhi
;
wined3d_mutex_lock
();
memcpy
(
&
light
->
light
,
data
,
data
->
dwSize
);
if
(
light
->
light
.
dwF
lags
&
D3DLIGHT_ACTIVE
)
memcpy
(
&
light
->
light
,
data
,
sizeof
(
D3DLIGHT
)
);
if
(
f
lags
&
D3DLIGHT_ACTIVE
)
light_update
(
light
);
light
->
light
.
dwFlags
=
flags
;
wined3d_mutex_unlock
();
return
D3D_OK
;
...
...
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