diff cd_graphics.c @ 2685:da2e06c42d16

Add a compile-time flag to use RGB565 instead of ABGR/ARGB
author Michael Pavone <pavone@retrodev.com>
date Sun, 30 Mar 2025 00:06:53 -0700
parents a1afe26a8ef0
children
line wrap: on
line diff
--- a/cd_graphics.c	Sat Mar 29 23:54:45 2025 -0700
+++ b/cd_graphics.c	Sun Mar 30 00:06:53 2025 -0700
@@ -263,7 +263,7 @@
 static void render_graphics_debug(segacd_context *cd)
 {
 	int pitch;
-	uint32_t *fb = render_get_framebuffer(cd->graphics_debug_window, &pitch);
+	pixel_t *fb = render_get_framebuffer(cd->graphics_debug_window, &pitch);
 	uint32_t pixels = (cd->gate_array[GA_STAMP_SIZE] & BIT_SMS) ? 4096 : 256;
 	uint32_t stamp_size = (cd->gate_array[GA_STAMP_SIZE] & BIT_STS) ? 32 : 16;
 	uint32_t num_stamps = pixels / stamp_size;
@@ -284,7 +284,7 @@
 				{
 					for (uint32_t y = start_y; y < start_y + stamp_size; y++)
 					{
-						uint32_t *line = fb + y * pitch / sizeof(uint32_t);
+						pixel_t *line = fb + y * pitch / sizeof(uint32_t);
 						for (uint32_t x = tile_x; x < tile_x + 8; x += 4)
 						{