travisvroman/kohi

Linux platform issues

Closed this issue · 2 comments

Hello. I've been following your tutorial and sadly has encountered a problem. On my system the uninitialized event variable has a exactly a nullptr value and message handling was not working correct.

See:

xcb_generic_event_t* event;
xcb_client_message_event_t* cm;
b8 quit_flagged = FALSE;
// Poll for events until null is returned.
while (event != 0) {

Also, it seems like your loop through screens is actually pointless, since it starts from zero and condition s > 0 fails instantly.

See:

for (i32 s = screen_p; s > 0; s--) {

Sorry if I'm incorrect and thanks in advance for any replies.

First, thank you for this, I appreciate the feedback.

I will look into the first issue and see what's going on. It's possible I missed something there.

As for the second issue, I am aware of it as well, as it was brought up in one of the comments on that video. Screen enumeration wasn't something that was needed - I'd put it in there for demonstration purposes but didn't actually wind up using/testing it, so it'll likely just be removed.

Ok, thanks for your answer!