From 9c23fe25639c3b3b33f13cd59f6bc06c32424621 Mon Sep 17 00:00:00 2001 From: Tatsuya79 Date: Sat, 3 Feb 2018 15:29:18 +0100 Subject: [PATCH] Reduce input lag by 1 frame --- libretro/libretro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro/libretro.c b/libretro/libretro.c index 519591a..2c270de 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -112,7 +112,6 @@ static void audio_callback(void *gb) static void vblank(GB_gameboy_t *gb) { - GB_update_keys_status(gb); audio_callback(gb); } @@ -361,6 +360,7 @@ void retro_run(void) bool updated = false; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) check_variables(); + GB_update_keys_status(&gb); GB_run_frame(&gb); video_cb(frame_buf, VIDEO_WIDTH, VIDEO_HEIGHT, VIDEO_WIDTH * sizeof(uint32_t));