diff --git a/src/devices/screen.c b/src/devices/screen.c index 9af2572..d277c3c 100644 --- a/src/devices/screen.c +++ b/src/devices/screen.c @@ -93,17 +93,17 @@ screen_resize(UxnScreen *p, Uint16 width, Uint16 height) if(bg && fg && pixels) { p->width = width; p->height = height; - screen_clear(p, &p->bg); - screen_clear(p, &p->fg); + screen_fill(p, &p->bg, 0); + screen_fill(p, &p->fg, 0); } } void -screen_clear(UxnScreen *p, Layer *layer) +screen_fill(UxnScreen *p, Layer *layer, Uint8 color) { Uint32 i, size = p->width * p->height; for(i = 0; i < size; i++) - layer->pixels[i] = 0x00; + layer->pixels[i] = color; layer->changed = 1; } diff --git a/src/devices/screen.h b/src/devices/screen.h index b6c948f..5367680 100644 --- a/src/devices/screen.h +++ b/src/devices/screen.h @@ -27,7 +27,7 @@ extern UxnScreen uxn_screen; void screen_palette(UxnScreen *p, Uint8 *addr); void screen_resize(UxnScreen *p, Uint16 width, Uint16 height); -void screen_clear(UxnScreen *p, Layer *layer); +void screen_fill(UxnScreen *p, Layer *layer, Uint8 color); void screen_redraw(UxnScreen *p); void screen_mono(UxnScreen *p);