From 63274f6f614ba52bd64c15937c70495019a0a235 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 21 Mar 2012 22:36:11 +0100 Subject: [PATCH] Only allow duping if ffmpeg is compiled in. --- dynamic.c | 5 +++++ ssnes.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dynamic.c b/dynamic.c index c4d6452169..0a479c59af 100644 --- a/dynamic.c +++ b/dynamic.c @@ -328,8 +328,13 @@ static bool environment_cb(unsigned cmd, void *data) break; case SNES_ENVIRONMENT_GET_CAN_DUPE: +#ifdef HAVE_FFMPEG *(bool*)data = true; SSNES_LOG("Environ GET_CAN_DUPE: true\n"); +#else + *(bool*)data = false; + SSNES_LOG("Environ GET_CAN_DUPE: false\n"); +#endif break; case SNES_ENVIRONMENT_SET_NEED_FULLPATH: diff --git a/ssnes.c b/ssnes.c index b58a69ee30..f2dd348dd8 100644 --- a/ssnes.c +++ b/ssnes.c @@ -166,12 +166,13 @@ static void video_frame(const uint16_t *data, unsigned width, unsigned height) if (!g_extern.video_active) return; - bool is_dupe = !data; adjust_crop(&data, &height); // Slightly messy code, // but we really need to do processing before blocking on VSync for best possible scheduling. #ifdef HAVE_FFMPEG + bool is_dupe = !data; + if (g_extern.recording && (!g_extern.filter.active || !g_settings.video.post_filter_record || is_dupe)) { struct ffemu_video_data ffemu_data = {0}; @@ -182,10 +183,10 @@ static void video_frame(const uint16_t *data, unsigned width, unsigned height) ffemu_data.is_dupe = is_dupe; ffemu_push_video(g_extern.rec, &ffemu_data); } -#endif if (is_dupe) return; +#endif const char *msg = msg_queue_pull(g_extern.msg_queue);