Add RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE

This commit is contained in:
twinaphex 2015-11-20 15:14:12 +01:00
parent 533b799692
commit 7b1f57b1cd
4 changed files with 7 additions and 11 deletions

View File

@ -1180,13 +1180,6 @@ bool video_driver_frame_filter_is_32bit(void)
return video_state.filter.out_rgb32; return video_state.filter.out_rgb32;
} }
bool video_driver_frame_filter_alive(void)
{
if (video_state.filter.filter)
return true;
return false;
}
rarch_softfilter_t *video_driver_frame_filter_get_ptr(void) rarch_softfilter_t *video_driver_frame_filter_get_ptr(void)
{ {
return video_state.filter.filter; return video_state.filter.filter;
@ -1220,6 +1213,10 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
return true; return true;
} }
break; break;
case RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE:
if (video_state.filter.filter)
return true;
return false;
case RARCH_DISPLAY_CTL_NONE: case RARCH_DISPLAY_CTL_NONE:
default: default:
break; break;

View File

@ -221,6 +221,7 @@ enum rarch_display_type
enum rarch_display_ctl_state enum rarch_display_ctl_state
{ {
RARCH_DISPLAY_CTL_NONE = 0, RARCH_DISPLAY_CTL_NONE = 0,
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
RARCH_DISPLAY_CTL_GET_FRAME_COUNT RARCH_DISPLAY_CTL_GET_FRAME_COUNT
}; };
@ -360,8 +361,6 @@ bool video_driver_frame_filter(const void *data,
unsigned *output_width, unsigned *output_height, unsigned *output_width, unsigned *output_height,
unsigned *output_pitch); unsigned *output_pitch);
bool video_driver_frame_filter_alive(void);
bool video_driver_frame_filter_is_32bit(void); bool video_driver_frame_filter_is_32bit(void);
rarch_softfilter_t *video_driver_frame_filter_get_ptr(void); rarch_softfilter_t *video_driver_frame_filter_get_ptr(void);

View File

@ -80,7 +80,7 @@ static void video_frame(const void *data, unsigned width,
* but we really need to do processing before blocking on VSync * but we really need to do processing before blocking on VSync
* for best possible scheduling. * for best possible scheduling.
*/ */
if ((!video_driver_frame_filter_alive() if ((!video_driver_ctl(RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE, NULL)
|| !settings->video.post_filter_record || !data || !settings->video.post_filter_record || !data
|| global->record.gpu_buffer) || global->record.gpu_buffer)
) )

View File

@ -365,7 +365,7 @@ bool recording_init(void)
else else
params.aspect_ratio = (float)params.out_width / params.out_height; params.aspect_ratio = (float)params.out_width / params.out_height;
if (settings->video.post_filter_record && video_driver_frame_filter_alive()) if (settings->video.post_filter_record && video_driver_ctl(RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE, NULL))
{ {
unsigned max_width = 0; unsigned max_width = 0;
unsigned max_height = 0; unsigned max_height = 0;