diff options
Diffstat (limited to 'example')
| -rwxr-xr-x | example/empty_example | bin | 16128 -> 16824 bytes | |||
| -rw-r--r-- | example/empty_example.c | 22 |
2 files changed, 18 insertions, 4 deletions
diff --git a/example/empty_example b/example/empty_example Binary files differindex 9f9c717..8f1efd7 100755 --- a/example/empty_example +++ b/example/empty_example diff --git a/example/empty_example.c b/example/empty_example.c index 81f9c04..85aa2eb 100644 --- a/example/empty_example.c +++ b/example/empty_example.c @@ -1,19 +1,33 @@ #define FBGL_IMPLEMENTATION +//#define FBGL_HIDE_CURSOR #include "../fbgl.h" #include <stdio.h> +#include <stddef.h> int main() { printf("version %s\n", fbgl_version_info()); printf("name %s\n", fbgl_name_info()); fbgl_t buffer; - if( fbgl_init("/dev/fb0", &buffer) == -1) { - fprintf(stdout, "error could not oppen fb device"); - return -1; + if (fbgl_init("/dev/fb0", &buffer) == -1) { + fprintf(stdout, "error could not oppen fb device"); + return -1; } fbgl_set_bg(&buffer, 0xFF0000); - while(1){} + + for (size_t i = 0; i < 100; ++i) { + for (size_t j = 0; j < 100; ++j) { + fbgl_put_pixel(i, j, 0x00FFFF, &buffer); + } + } + int l = 0; + while (1) { + if(fbgl_check_esc_key()) { + fprintf(stdout, "esc pressed", fbgl_check_esc_key()); + + } + } return 0; } |
