Add use_rgba member to video_frame_info_t

This commit is contained in:
twinaphex 2017-01-20 14:04:50 +01:00
parent 913d2362e8
commit 58a47e860a
3 changed files with 3 additions and 3 deletions

View File

@ -737,13 +737,11 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame,
else
#endif
{
bool use_rgba = video_driver_supports_rgba();
glPixelStorei(GL_UNPACK_ALIGNMENT,
video_pixel_get_alignment(width * gl->base_size));
/* Fallback for GLES devices without GL_BGRA_EXT. */
if (gl->base_size == 4 && use_rgba)
if (gl->base_size == 4 && video_info->use_rgba)
{
video_frame_convert_argb8888_to_abgr8888(
&gl->scaler,

View File

@ -2279,6 +2279,7 @@ void video_driver_build_info(video_frame_info_t *video_info)
video_info->width = video_driver_width;
video_info->height = video_driver_height;
video_info->use_rgba = video_driver_supports_rgba();
video_driver_threaded_unlock();
}

View File

@ -111,6 +111,7 @@ typedef struct video_frame_info
float font_msg_color_r;
float font_msg_color_g;
float font_msg_color_b;
bool use_rgba;
} video_frame_info_t;
/* Optionally implemented interface to poke more