Skip to content

Commit

Permalink
only equip views with entities if their spec dictates that they're pa…
Browse files Browse the repository at this point in the history
…rameterized by entities
  • Loading branch information
ryanfleury committed Jan 24, 2024
1 parent d07ae91 commit 3edc67e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/df/gfx/df_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,11 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
{
DF_Panel *panel = df_panel_from_handle(params.panel);
DF_ViewSpec *spec = params.view_spec;
DF_Entity *entity = df_entity_from_handle(params.entity);
DF_Entity *entity = &df_g_nil_entity;
if(spec->info.flags & DF_ViewSpecFlag_ParameterizedByEntity)
{
entity = df_entity_from_handle(params.entity);
}
if(!df_panel_is_nil(panel) && spec != &df_g_nil_view_spec)
{
DF_View *view = df_view_alloc();
Expand Down

0 comments on commit 3edc67e

Please sign in to comment.