prevent scheduler window from crashing the emulator when minimized

This commit is contained in:
Matthew Berry 2022-03-26 14:19:10 -07:00
parent 0f21ea6aea
commit 515d12aaa2

View file

@ -41,7 +41,7 @@ class GBAController < Controller
cycles = @emu.scheduler.cycles
ImGui.begin("Scheduler", pointerof(@scheduler_window))
ImGui.text("Total cycles: #{cycles}")
ImGui.begin_table("Table", 2)
if ImGui.begin_table("Table", 2)
ImGui.table_setup_column("Cycles")
ImGui.table_setup_column("Type")
ImGui.table_headers_row
@ -53,6 +53,7 @@ class GBAController < Controller
ImGui.text_unformatted event.type.to_s
end
ImGui.end_table
end
ImGui.end
end
end