build: do not allow to compile f0rmz and unl0kr without graphical backends

This commit is contained in:
Vladimir Stoiakin 2025-09-27 23:23:41 +03:00
parent 32b26b8e34
commit 742bb6af1c
4 changed files with 15 additions and 21 deletions

View file

@ -6,28 +6,23 @@
#include "backends.h"
#include "../shared/log.h"
#include "log.h"
#include <string.h>
/**
* Public interface
*/
const char *bbx_backends_backends[] = {
static const char *backends[] = {
#if LV_USE_LINUX_FBDEV
"fbdev",
#endif /* LV_USE_LINUX_FBDEV */
#endif
#if LV_USE_LINUX_DRM
"drm",
#endif /* LV_USE_LINUX_DRM */
#endif
NULL
};
bbx_backends_backend_id_t bbx_backends_find_backend_with_name(const char *name) {
for (int i = 0; bbx_backends_backends[i] != NULL; ++i) {
if (strcmp(bbx_backends_backends[i], name) == 0) {
for (int i = 0; backends[i] != NULL; ++i) {
if (strcmp(backends[i], name) == 0) {
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Found backend: %s\n", name);
return i;
}