summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorlvntky <klevent1903@gmail.com>2024-11-21 12:50:02 +0300
committerlvntky <klevent1903@gmail.com>2024-11-21 12:50:02 +0300
commit95aa33f584b026ecbf1a515086f04a727bb0ae57 (patch)
tree0e920ca4fa0eca22ea01948aee3e9bf13e7d73c0 /example
parent7069bfb303e86354406c94d59e1e2e47f126c984 (diff)
[feature] basic fb0 initializtion
Diffstat (limited to 'example')
-rwxr-xr-xexample/empty_examplebin15720 -> 16128 bytes
-rw-r--r--example/empty_example.c9
2 files changed, 7 insertions, 2 deletions
diff --git a/example/empty_example b/example/empty_example
index e19c325..9f9c717 100755
--- a/example/empty_example
+++ b/example/empty_example
Binary files 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 <stdio.h>
@@ -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;
}