wined3d: Clean up lights in wined3d_stateblock_cleanup().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46829 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5b2113de2d
commit
cc5c9e8dff
|
@ -523,6 +523,7 @@ void state_unbind_resources(struct wined3d_state *state)
|
|||
|
||||
void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state)
|
||||
{
|
||||
struct wined3d_light_info *light, *cursor;
|
||||
struct wined3d_vertex_declaration *decl;
|
||||
struct wined3d_texture *texture;
|
||||
struct wined3d_buffer *buffer;
|
||||
|
@ -570,6 +571,15 @@ void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state)
|
|||
wined3d_texture_decref(texture);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < LIGHTMAP_SIZE; ++i)
|
||||
{
|
||||
LIST_FOR_EACH_ENTRY_SAFE(light, cursor, &state->light_state.light_map[i], struct wined3d_light_info, entry)
|
||||
{
|
||||
list_remove(&light->entry);
|
||||
heap_free(light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void state_cleanup(struct wined3d_state *state)
|
||||
|
|
Loading…
Reference in New Issue