diff options
Diffstat (limited to 'test/bitmap.c')
-rw-r--r-- | test/bitmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/bitmap.c b/test/bitmap.c index b14f2f6..f4289d3 100644 --- a/test/bitmap.c +++ b/test/bitmap.c @@ -95,6 +95,11 @@ int main(int argc, char **argv) /* get the geometry of the whole screen */ box.x0 = box.y0 = 0; nsfb_get_geometry(nsfb, &box.x1, &box.y1, NULL); + if ((box.x1 == 0) || (box.y1 == 0)) { + /* if surface was created with no size set a default */ + nsfb_set_geometry(nsfb, 800, 600, NSFB_FMT_ANY); + nsfb_get_geometry(nsfb, &box.x1, &box.y1, NULL); + } /* claim the whole screen for update */ nsfb_claim(nsfb, &box); |