diff --git a/backend/fbdev.c b/backend/fbdev.c index f015fa3..a48900c 100644 --- a/backend/fbdev.c +++ b/backend/fbdev.c @@ -123,21 +123,21 @@ static bool twin_fbdev_work(void *closure) return true; } -static bool twin_fbdev_is_rgb565(twin_fbdev_t *tx) +static inline bool twin_fbdev_is_rgb565(twin_fbdev_t *tx) { return tx->fb_var.red.offset == 11 && tx->fb_var.red.length == 5 && tx->fb_var.green.offset == 5 && tx->fb_var.green.length == 6 && tx->fb_var.blue.offset == 0 && tx->fb_var.blue.length == 5; } -static bool twin_fbdev_is_rgb888(twin_fbdev_t *tx) +static inline bool twin_fbdev_is_rgb888(twin_fbdev_t *tx) { return tx->fb_var.red.offset == 16 && tx->fb_var.red.length == 8 && tx->fb_var.green.offset == 8 && tx->fb_var.green.length == 8 && tx->fb_var.blue.offset == 0 && tx->fb_var.blue.length == 8; } -static bool twin_fbdev_is_argb32(twin_fbdev_t *tx) +static inline bool twin_fbdev_is_argb32(twin_fbdev_t *tx) { return tx->fb_var.red.offset == 16 && tx->fb_var.red.length == 8 && tx->fb_var.green.offset == 8 && tx->fb_var.green.length == 8 && @@ -169,19 +169,19 @@ static bool twin_fbdev_apply_config(twin_fbdev_t *tx) /* Examine the framebuffer format */ switch (tx->fb_var.bits_per_pixel) { - case 16: // RGB565 + case 16: /* RGB565 */ if (!twin_fbdev_is_rgb565(tx)) { log_error("Invalid framebuffer format for 16 bpp"); return false; } break; - case 24: // RGB888 + case 24: /* RGB888 */ if (!twin_fbdev_is_rgb888(tx)) { log_error("Invalid framebuffer format for 24 bpp"); return false; } break; - case 32: // ARGB32 + case 32: /* ARGB32 */ if (!twin_fbdev_is_argb32(tx)) { log_error("Invalid framebuffer format for 32 bpp"); return false;