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
ffb5f749
Commit
ffb5f749
authored
Apr 20, 2009
by
Christian Costa
Committed by
Alexandre Julliard
Apr 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Handle refcount of lights when interacting with viewport.
parent
8681d490
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
viewport.c
dlls/ddraw/viewport.c
+5
-0
No files found.
dlls/ddraw/viewport.c
View file @
ffb5f749
...
...
@@ -751,6 +751,7 @@ IDirect3DViewportImpl_AddLight(IDirect3DViewport3 *iface,
/* Add the light in the 'linked' chain */
lpDirect3DLightImpl
->
next
=
This
->
lights
;
This
->
lights
=
lpDirect3DLightImpl
;
IDirect3DLight_AddRef
(
lpDirect3DLight
);
/* Attach the light to the viewport */
lpDirect3DLightImpl
->
active_viewport
=
This
;
...
...
@@ -796,6 +797,7 @@ IDirect3DViewportImpl_DeleteLight(IDirect3DViewport3 *iface,
else
prev_light
->
next
=
cur_light
->
next
;
/* Detach the light to the viewport */
cur_light
->
active_viewport
=
NULL
;
IDirect3DLight_Release
(
(
IDirect3DLight
*
)
cur_light
);
This
->
num_lights
--
;
This
->
map_lights
&=
~
(
1
<<
lpDirect3DLightImpl
->
dwLightIndex
);
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -871,6 +873,9 @@ IDirect3DViewportImpl_NextLight(IDirect3DViewport3 *iface,
break
;
}
if
(
*
lplpDirect3DLight
)
IDirect3DLight_AddRef
(
*
lplpDirect3DLight
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
*
lplpDirect3DLight
?
D3D_OK
:
DDERR_INVALIDPARAMS
;
...
...
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