# HG changeset patch # User John Tsiombikas # Date 1421553111 -7200 # Node ID e32bdd5fb622a9463efc9d9e635ddec72fb32d42 # Parent cdbcae5b3b98b2ac5df1cdf39a2f38bbdd3cb768 foo diff -r cdbcae5b3b98 -r e32bdd5fb622 src/main.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main.c Sun Jan 18 05:51:51 2015 +0200 @@ -0,0 +1,37 @@ +#include +#include "fblib.h" + +static void display(); + +int main(int argc, char **argv) +{ + if(fb_init(320, 240, 8) == -1) { + return 1; + } + fb_set_palette_entry(1, 255, 0, 0); + + for(;;) { + if(fb_process_events() == -1) { + break; + } + display(); + } + +done: + fb_shutdown(); + return 0; +} + +void display() +{ + int i; + int width = fb_get_width(); + int height = fb_get_height(); + unsigned char *pixels = (unsigned char*)fb_begin_frame(); + + for(i=0; i -#include "fblib.h" - -static void display(); - -int main(int argc, char **argv) -{ - if(fb_init(320, 240, 8) == -1) { - return 1; - } - fb_set_palette_entry(1, 255, 0, 0); - - for(;;) { - if(fb_process_events() == -1) { - break; - } - display(); - } - -done: - fb_shutdown(); - return 0; -} - -void display() -{ - int width = fb_get_width(); - int height = fb_get_height(); - unsigned char *pixels = (unsigned char*)fb_begin_frame(); - - for(int i=0; i