Merge branch 'absent_graphics' into 'master'
build: do not allow to compile f0rmz and unl0kr without graphical backends See merge request postmarketOS/buffybox!65
This commit is contained in:
commit
39fc01873d
4 changed files with 15 additions and 21 deletions
|
|
@ -165,7 +165,7 @@ static int parsing_handler(void* user_data, const char* section, const char* key
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void f0_config_init_opts(f0_config_opts *opts) {
|
void f0_config_init_opts(f0_config_opts *opts) {
|
||||||
opts->general.backend = bbx_backends_backends[0] == NULL ? BBX_BACKENDS_BACKEND_NONE : 0;
|
opts->general.backend = 0;
|
||||||
opts->intro.title = "A Form!";
|
opts->intro.title = "A Form!";
|
||||||
opts->intro.body = "Please complete the following form.";
|
opts->intro.body = "Please complete the following form.";
|
||||||
opts->theme.default_id = BBX_THEMES_THEME_BREEZY_DARK;
|
opts->theme.default_id = BBX_THEMES_THEME_BREEZY_DARK;
|
||||||
|
|
|
||||||
|
|
@ -6,28 +6,23 @@
|
||||||
|
|
||||||
#include "backends.h"
|
#include "backends.h"
|
||||||
|
|
||||||
#include "../shared/log.h"
|
#include "log.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
static const char *backends[] = {
|
||||||
/**
|
|
||||||
* Public interface
|
|
||||||
*/
|
|
||||||
|
|
||||||
const char *bbx_backends_backends[] = {
|
|
||||||
#if LV_USE_LINUX_FBDEV
|
#if LV_USE_LINUX_FBDEV
|
||||||
"fbdev",
|
"fbdev",
|
||||||
#endif /* LV_USE_LINUX_FBDEV */
|
#endif
|
||||||
#if LV_USE_LINUX_DRM
|
#if LV_USE_LINUX_DRM
|
||||||
"drm",
|
"drm",
|
||||||
#endif /* LV_USE_LINUX_DRM */
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
bbx_backends_backend_id_t bbx_backends_find_backend_with_name(const char *name) {
|
bbx_backends_backend_id_t bbx_backends_find_backend_with_name(const char *name) {
|
||||||
for (int i = 0; bbx_backends_backends[i] != NULL; ++i) {
|
for (int i = 0; backends[i] != NULL; ++i) {
|
||||||
if (strcmp(bbx_backends_backends[i], name) == 0) {
|
if (strcmp(backends[i], name) == 0) {
|
||||||
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Found backend: %s\n", name);
|
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Found backend: %s\n", name);
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@
|
||||||
#ifndef BBX_BACKENDS_H
|
#ifndef BBX_BACKENDS_H
|
||||||
#define BBX_BACKENDS_H
|
#define BBX_BACKENDS_H
|
||||||
|
|
||||||
#include "lvgl/lvgl.h"
|
#include "lv_conf.h"
|
||||||
|
|
||||||
|
#if LV_USE_LINUX_FBDEV == 0 && LV_USE_LINUX_DRM == 0
|
||||||
|
#error Neither of graphical backends is enabled
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Backend identifiers
|
* Backend identifiers
|
||||||
|
|
@ -18,17 +22,12 @@ typedef enum {
|
||||||
BBX_BACKENDS_BACKEND_NONE = -1,
|
BBX_BACKENDS_BACKEND_NONE = -1,
|
||||||
#if LV_USE_LINUX_FBDEV
|
#if LV_USE_LINUX_FBDEV
|
||||||
BBX_BACKENDS_BACKEND_FBDEV,
|
BBX_BACKENDS_BACKEND_FBDEV,
|
||||||
#endif /* LV_USE_LINUX_FBDEV */
|
#endif
|
||||||
#if LV_USE_LINUX_DRM
|
#if LV_USE_LINUX_DRM
|
||||||
BBX_BACKENDS_BACKEND_DRM,
|
BBX_BACKENDS_BACKEND_DRM,
|
||||||
#endif /* LV_USE_LINUX_DRM */
|
#endif
|
||||||
} bbx_backends_backend_id_t;
|
} bbx_backends_backend_id_t;
|
||||||
|
|
||||||
/**
|
|
||||||
* Actual backends
|
|
||||||
*/
|
|
||||||
extern const char *bbx_backends_backends[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the first backend with a given name.
|
* Find the first backend with a given name.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ static int parsing_handler(void* user_data, const char* section, const char* key
|
||||||
|
|
||||||
void ul_config_init_opts(ul_config_opts *opts) {
|
void ul_config_init_opts(ul_config_opts *opts) {
|
||||||
opts->general.animations = false;
|
opts->general.animations = false;
|
||||||
opts->general.backend = bbx_backends_backends[0] == NULL ? BBX_BACKENDS_BACKEND_NONE : 0;
|
opts->general.backend = 0;
|
||||||
opts->general.timeout = 0;
|
opts->general.timeout = 0;
|
||||||
opts->keyboard.autohide = true;
|
opts->keyboard.autohide = true;
|
||||||
opts->keyboard.layout_id = SQ2LV_LAYOUT_US;
|
opts->keyboard.layout_id = SQ2LV_LAYOUT_US;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue