vurtun / nuklear

A single-header ANSI C gui library
13.68k stars 1.11k forks source link

Implement missing features and make multiple fixes for x11_rawfb #851

Closed 0x0203 closed 5 years ago

0x0203 commented 5 years ago

This is effectively the same as PR #847 with a cleaned up commit history and the addition of making the pixel layout determined at runtime instead of relying on compile time decisions. This is done by storing the pixel layout (as an enum) in the struct rawfb_image. This is determined by reading the appropriate masks out of the XImage in nk_xlib_init() and setting the pixel layout appropriately. Currently only supports XRGB and RGBX.

Also fixed up some potential null dereferencing issues on error return paths.

The rest of the fixes are (see #847 for details):

0x0203 commented 5 years ago

Good suggestions, thanks. I'll make another pull request. I'm still learning/getting used to the whole git/github workflow... should I create a new branch or if I continue to use this one for the new changes will everything still play nicely since your merge?

dumblob commented 5 years ago

There shouldn't be any issues IMHO if you continue with this branch (judging based on the standard Git behavior). But I also don't have experience with exactly this case and GitHub, so let's try :wink:.