mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Fix ifdefs regarding READ_PIXELS.
This commit is contained in:
parent
144ee18ed3
commit
bee70f8318
8
gfx/gl.c
8
gfx/gl.c
@ -2342,7 +2342,6 @@ static bool gl_set_shader(void *data, enum rarch_shader_type type, const char *p
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_GL_READ_VIEWPORT
|
||||
static void gl_viewport_info(void *data, struct rarch_viewport *vp)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
@ -2356,6 +2355,7 @@ static void gl_viewport_info(void *data, struct rarch_viewport *vp)
|
||||
vp->y = top_dist;
|
||||
}
|
||||
|
||||
#ifndef NO_GL_READ_PIXELS
|
||||
static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
{
|
||||
unsigned i;
|
||||
@ -2370,7 +2370,6 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
gl_bind_backbuffer();
|
||||
#endif
|
||||
|
||||
#ifndef NO_GL_READ_PIXELS
|
||||
#ifdef HAVE_OPENGLES
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, get_alignment(gl->vp.width * 3));
|
||||
// GLES doesn't support glReadBuffer ... Take a chance that it'll work out right.
|
||||
@ -2417,7 +2416,6 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
gl->vp.width, gl->vp.height,
|
||||
GL_BGR, GL_UNSIGNED_BYTE, buffer);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RARCH_PERFORMANCE_STOP(read_viewport);
|
||||
@ -2746,12 +2744,12 @@ const video_driver_t video_gl = {
|
||||
#endif
|
||||
gl_set_rotation,
|
||||
|
||||
#ifndef NO_GL_READ_VIEWPORT
|
||||
gl_viewport_info,
|
||||
|
||||
#ifndef NO_GL_READ_PIXELS
|
||||
gl_read_viewport,
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
|
Loading…
x
Reference in New Issue
Block a user