From 131b6c4a00575c9e996a9ae60c90a9647fb5ef75 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 20 Jan 2010 17:18:28 +0000 Subject: move plot functions to their own sub directory fix 8 and 16bpp plotters when used with cursor svn path=/trunk/libnsfb/; revision=9850 --- test/plottest.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test') 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; -- cgit v1.2.3