Only allow duping if ffmpeg is compiled in.

This commit is contained in:
Themaister 2012-03-21 22:36:11 +01:00
parent b907cb667a
commit 63274f6f61
2 changed files with 8 additions and 2 deletions

View File

@ -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:

View File

@ -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);