diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-20 17:18:28 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2010-01-20 17:18:28 +0000 |
commit | 131b6c4a00575c9e996a9ae60c90a9647fb5ef75 (patch) | |
tree | dba439673b801a22a833270dbd615628bf0614e4 /test | |
parent | a3097232844a20ea918d63722dbe6a7c71493bab (diff) | |
download | libnsfb-131b6c4a00575c9e996a9ae60c90a9647fb5ef75.tar.gz libnsfb-131b6c4a00575c9e996a9ae60c90a9647fb5ef75.tar.bz2 |
move plot functions to their own sub directory
fix 8 and 16bpp plotters when used with cursor
svn path=/trunk/libnsfb/; revision=9850
Diffstat (limited to 'test')
-rw-r--r-- | test/plottest.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/plottest.c b/test/plottest.c index 8be921e..74134c4 100644 --- a/test/plottest.c +++ b/test/plottest.c @@ -70,6 +70,7 @@ const struct { int main(int argc, char **argv) { nsfb_t *nsfb; + int bpp; nsfb_event_t event; nsfb_bbox_t box; nsfb_bbox_t box2; @@ -80,8 +81,13 @@ int main(int argc, char **argv) int loop; nsfb_plot_pen_t pen; - UNUSED(argc); - UNUSED(argv); + if (argc < 2) { + bpp = 32; + } else { + bpp = atoi(argv[1]); + if (bpp == 0) + bpp = 32; + } nsfb = nsfb_init(NSFB_FRONTEND_SDL); if (nsfb == NULL) { @@ -89,6 +95,12 @@ int main(int argc, char **argv) return 1; } + if (nsfb_set_geometry(nsfb, 0, 0, bpp) == -1) { + fprintf(stderr, "Unable to set geometry\n"); + nsfb_finalise(nsfb); + return 3; + } + if (nsfb_init_frontend(nsfb) == -1) { fprintf(stderr, "Unable to initialise nsfb frontend\n"); return 2; |