mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 15:42:23 -07:00
fix incorrect os_window_first_paint rules
This commit is contained in:
@@ -984,6 +984,7 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src)
|
||||
window = push_array(df_gfx_state->arena, DF_Window, 1);
|
||||
}
|
||||
window->gen += 1;
|
||||
window->frames_alive = 0;
|
||||
window->cfg_src = cfg_src;
|
||||
window->arena = arena_alloc();
|
||||
{
|
||||
|
||||
+12
-3
@@ -372,11 +372,20 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data)
|
||||
//////////////////////////////
|
||||
//- rjf: show windows after first frame
|
||||
//
|
||||
for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next)
|
||||
if(os_handle_match(repaint_window_handle, os_handle_zero()))
|
||||
{
|
||||
if(w->frames_alive == 1)
|
||||
DF_HandleList windows_to_show = {0};
|
||||
for(DF_Window *w = df_gfx_state->first_window; w != 0; w = w->next)
|
||||
{
|
||||
os_window_first_paint(w->os);
|
||||
if(w->frames_alive == 1)
|
||||
{
|
||||
df_handle_list_push(scratch.arena, &windows_to_show, df_handle_from_window(w));
|
||||
}
|
||||
}
|
||||
for(DF_HandleNode *n = windows_to_show.first; n != 0; n = n->next)
|
||||
{
|
||||
DF_Window *window = df_window_from_handle(n->handle);
|
||||
os_window_first_paint(window->os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user