From e9ce0aaaa4a1643024cd4198e2cf9ac1256ccc5e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 5 Jan 2014 18:48:09 +0100 Subject: [PATCH] (PS3) Custom aspect ratio works now --- gfx/gl.c | 3 ++- gfx/gl_common.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/gl.c b/gfx/gl.c index 8ca01ff989..76db1ac7f1 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -2360,7 +2360,6 @@ static bool gl_read_viewport(void *data, uint8_t *buffer) { unsigned i; gl_t *gl = (gl_t*)data; - (void)i; RARCH_PERFORMANCE_INIT(read_viewport); RARCH_PERFORMANCE_START(read_viewport); @@ -2371,6 +2370,7 @@ 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,6 +2417,7 @@ 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); diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 99cc677204..1292aecbb7 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -309,7 +309,7 @@ typedef struct gl // Platform specific workarounds/hacks. #if defined(__CELLOS_LV2__) -#define NO_GL_READ_VIEWPORT +#define NO_GL_READ_PIXELS // Performance hacks #ifdef HAVE_RGL