(dynamic dummy core) Let's not perform this every frame

This commit is contained in:
twinaphex 2017-05-01 23:40:34 +02:00
parent acabead15a
commit b1cf9adfef

View File

@ -27,7 +27,11 @@ static uint16_t *frame_buf;
void libretro_dummy_retro_init(void)
{
unsigned i;
frame_buf = (uint16_t*)calloc(320 * 240, sizeof(uint16_t));
for (i = 0; i < 320 * 240; i++)
frame_buf[i] = 4 << 5;
}
void libretro_dummy_retro_deinit(void)
@ -121,11 +125,7 @@ void libretro_dummy_retro_reset(void)
void libretro_dummy_retro_run(void)
{
unsigned i;
dummy_input_poll_cb();
for (i = 0; i < 320 * 240; i++)
frame_buf[i] = 4 << 5;
dummy_video_cb(frame_buf, 320, 240, 640);
}