From 4049e204354aa388f9cf5cd57ef23c016f219199 Mon Sep 17 00:00:00 2001 From: Zane van Iperen Date: Sat, 11 May 2024 16:32:58 +1000 Subject: [PATCH] examples/devpmtest: describe how to use a memory pixelmap a backbuffer --- examples/devpmtest/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/devpmtest/main.c b/examples/devpmtest/main.c index 87813240..848574c0 100644 --- a/examples/devpmtest/main.c +++ b/examples/devpmtest/main.c @@ -973,11 +973,17 @@ int main(int argc, char **argv) width = screen->width; height = screen->height; +#if 0 /* Set 1 to use a memory pixelmap as the backbuffer. */ + if((colour_buffer = BrPixelmapAllocate(screen->type, screen->width, screen->height, NULL, BR_PMAF_NORMAL)) == NULL) { + BrLogError("APP", "BrPixelmapMatchTypedSized() failed."); + goto screen_creation_failed; + } +#else if((colour_buffer = BrPixelmapMatch(screen, BR_PMMATCH_OFFSCREEN)) == NULL) { BrLogError("APP", "BrPixelmapMatchTypedSized() failed."); goto screen_creation_failed; } - +#endif screen->origin_x = colour_buffer->origin_x = (br_int_16)(width / 2); screen->origin_y = colour_buffer->origin_y = (br_int_16)(height / 2);