Cmd: Disable Saphir on task end cleanup if we are the last Win

This commit is contained in:
Alec Murphy
2026-05-02 17:29:39 -04:00
parent 8b784fae0a
commit 1a38c95dc3
+7 -1
View File
@@ -1,3 +1,5 @@
extern I64 Saphir(Bool enable = TRUE);
U0 saphir_debug_info(SaphirRect* rect)
{
DCFill;
@@ -167,6 +169,10 @@ Bool saphir_reflow(SaphirNode* node = NULL)
U0 saphir_reflow_task_end()
{
if (saphir.current_node == saphir.root_node && saphir.current_node->count == 1) {
Saphir(0);
return;
}
while (!saphir_reflow)
;
}
@@ -351,4 +357,4 @@ U0 saphir_enable()
saphir.current_node->index = 0;
while (!saphir_reflow)
;
}
}