diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-05 15:24:29 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-02-05 15:24:29 +0000 |
commit | 127cb1ff9a7bbb7af73cc418a7adc30d68c454d2 (patch) | |
tree | cf8faa171390d9f62d3d5cabe7150bdcab4b7e9f | |
parent | 936e32b08c05c9658cc51cd8fe118e0342733a79 (diff) |
tweak it
-rw-r--r-- | tests/modefb/demo.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/modefb/demo.c b/tests/modefb/demo.c index f80753cf..ef2b6585 100644 --- a/tests/modefb/demo.c +++ b/tests/modefb/demo.c @@ -97,8 +97,8 @@ void draw(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsign void prettyColors(int fd) { - unsigned int *ptr, *newptr; - int i,w,h; + unsigned int *ptr; + int i; int size = var.xres * var.yres * var.bits_per_pixel; ptr = (unsigned int *)mmap(NULL, size, @@ -109,13 +109,7 @@ void prettyColors(int fd) exit(1); } - newptr = ptr; - for (h = 0; h < var.yres; h++) { - for (w = 0; w < var.xres; w++) { - newptr[w] = 0xFFFFFFFF; - } - newptr += var.xres_virtual; - } + memset(ptr, 0xFF, size); for (i = 0; i < 8; i++) draw(i * 40, i * 40, 40, 40, 0, ptr); |