diff render.h @ 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 c30e5548154f
children 05915f01046d
line wrap: on
line diff
--- a/render.h	Sat Mar 29 23:54:45 2025 -0700
+++ b/render.h	Sun Mar 30 00:06:53 2025 -0700
@@ -99,14 +99,16 @@
 typedef void (*ui_render_fun)(void);
 typedef int (*render_thread_fun)(void*);
 
-uint32_t render_map_color(uint8_t r, uint8_t g, uint8_t b);
+#include "pixel.h"
+
+pixel_t render_map_color(uint8_t r, uint8_t g, uint8_t b);
 void render_save_screenshot(char *path);
 uint8_t render_saving_video(void);
 void render_end_video(void);
 void render_save_video(char *path);
 uint8_t render_create_window(char *caption, uint32_t width, uint32_t height, window_close_handler close_handler);
 void render_destroy_window(uint8_t which);
-uint32_t *render_get_framebuffer(uint8_t which, int *pitch);
+pixel_t *render_get_framebuffer(uint8_t which, int *pitch);
 void render_framebuffer_updated(uint8_t which, int width);
 //returns the framebuffer index associated with the Window that has focus
 uint8_t render_get_active_framebuffer(void);