optimize playtwitch

This commit is contained in:
LordMZTE 2022-10-29 23:41:15 +02:00
parent a78f02d5c2
commit 9e0b6172c5
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -46,6 +46,9 @@ pub fn main() !void {
defer state.deinit();
while (c.glfwWindowShouldClose(win) == 0) {
if (c.glfwGetWindowAttrib(win, c.GLFW_VISIBLE) == 0)
continue;
c.glfwPollEvents();
var win_width: c_int = 0;
@ -75,7 +78,7 @@ pub fn main() !void {
c.ImGuiCond_Always,
);
if (win_visible and c.glfwGetWindowAttrib(win, c.GLFW_VISIBLE) != 0) {
if (win_visible) {
try gui.winContent(state);
}