I just wanted to follow up on this before I start making any changes.
It looks like the appropriate place to implement auto-backend select is:
src/libnsfb.c
nsfb_t*
nsfb_new(const enum nsfb_type_e surface_type)
{
nsfb_t *newfb;
newfb = calloc(1, sizeof(nsfb_t));
if (newfb == NULL)
- return NULL;
+{
+ /*autoselect code here: if (getenv("WAYLAND_DISPLAY")) ... */
+}else{
It looks like modes that are not supported still get checked,
but could be skipped if libnsfb.h had some #ifdefs for:
enum nsfb_type_e {
NSFB_SURFACE_NONE = 0, /**< No surface */
NSFB_SURFACE_RAM, /**< RAM surface */
#ifdef NSFB_SDL_AVAILABLE
NSFB_SURFACE_SDL, /**< SDL surface */
No comments:
Post a Comment