From 95aa33f584b026ecbf1a515086f04a727bb0ae57 Mon Sep 17 00:00:00 2001 From: lvntky Date: Thu, 21 Nov 2024 12:50:02 +0300 Subject: [feature] basic fb0 initializtion --- example/empty_example | Bin 15720 -> 16128 bytes example/empty_example.c | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/empty_example b/example/empty_example index e19c325..9f9c717 100755 Binary files a/example/empty_example and b/example/empty_example differ diff --git a/example/empty_example.c b/example/empty_example.c index c275526..81f9c04 100644 --- a/example/empty_example.c +++ b/example/empty_example.c @@ -1,5 +1,5 @@ #define FBGL_IMPLEMENTATION -#include "../include/fbgl/fbgl.h" +#include "../fbgl.h" #include @@ -8,7 +8,12 @@ int main() printf("version %s\n", fbgl_version_info()); printf("name %s\n", fbgl_name_info()); fbgl_t buffer; - fbgl_init("/dev/fb0", &buffer); + if( fbgl_init("/dev/fb0", &buffer) == -1) { + fprintf(stdout, "error could not oppen fb device"); + return -1; + } + fbgl_set_bg(&buffer, 0xFF0000); + while(1){} return 0; } -- cgit v1.2.3