I am trying to make a flappy bird clone using xlib and I have an XSendEvent inside a function and that function is inside a while loop i am thinking that that is the issue so is there a better way to update the screen? I just need it to stop flashing.
its the rectangle i am drawing on screen line 62
I Know I am drawing every Frame but I am not sure about how else to go about it. Any Great Code Examples Would be great and any Code Examples for Double Buffering would be great even if its on other websites.
here is my code - https://paste.myst.rs/u6ykgg7v