static void *vout_buf;
static int samples_sent, samples_to_send;
static int plugins_opened;
-static int native_rgb565;
/* memory card data */
extern char Mcd1Data[MCD_SIZE];
{
}
+#ifdef FRONTEND_SUPPORTS_RGB565
static void convert(void *buf, size_t bytes)
{
unsigned int i, v, *p = buf;
p[i] = (v & 0x001f001f) | ((v >> 1) & 0x7fe07fe0);
}
}
+#endif
static void vout_flip(const void *vram, int stride, int bgr24, int w, int h)
{
}
out:
- if (!native_rgb565)
- convert(vout_buf, w * h * 2);
+#ifndef FRONTEND_SUPPORTS_RGB565
+ convert(vout_buf, w * h * 2);
+#endif
video_cb(vout_buf, w, h, w * 2);
pl_rearmed_cbs.flip_cnt++;
}
bool retro_load_game(const struct retro_game_info *info)
{
+#ifdef FRONTEND_SUPPORTS_RGB565
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
if (environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) {
- native_rgb565 = 1;
fprintf(stderr, "RGB565 supported, using it\n");
}
+#endif
if (plugins_opened) {
ClosePlugins();
free(vout_buf);
vout_buf = NULL;
}
-