Add RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT

This commit is contained in:
twinaphex 2015-11-20 15:16:58 +01:00
parent 7b1f57b1cd
commit ba4643a7c1
3 changed files with 6 additions and 10 deletions

View File

@ -1175,11 +1175,6 @@ bool video_driver_frame_filter(const void *data,
return true;
}
bool video_driver_frame_filter_is_32bit(void)
{
return video_state.filter.out_rgb32;
}
rarch_softfilter_t *video_driver_frame_filter_get_ptr(void)
{
return video_state.filter.filter;
@ -1217,6 +1212,8 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
if (video_state.filter.filter)
return true;
return false;
case RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT:
return video_state.filter.out_rgb32;
case RARCH_DISPLAY_CTL_NONE:
default:
break;

View File

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

View File

@ -369,11 +369,11 @@ bool recording_init(void)
{
unsigned max_width = 0;
unsigned max_height = 0;
params.pix_fmt = FFEMU_PIX_RGB565;
if (video_driver_frame_filter_is_32bit())
if (video_driver_ctl(RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT, NULL))
params.pix_fmt = FFEMU_PIX_ARGB8888;
else
params.pix_fmt = FFEMU_PIX_RGB565;
rarch_softfilter_get_max_output_size(
video_driver_frame_filter_get_ptr(),