From 8d3a4fae8e3ef1fa7e75ea01110111746d96bfb1 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 17 Aug 2019 11:59:25 -0700 Subject: [PATCH] iOS: Ignore gl3stubInit() on iOS, to avoid warnings. It always returns true anyway. --- ext/native/gfx_es2/gl3stub.c | 14 ++++++++------ ext/native/gfx_es2/gl3stub.h | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ext/native/gfx_es2/gl3stub.c b/ext/native/gfx_es2/gl3stub.c index 2a846a32d9..265004a9c3 100644 --- a/ext/native/gfx_es2/gl3stub.c +++ b/ext/native/gfx_es2/gl3stub.c @@ -14,15 +14,14 @@ * limitations under the License. */ +#include "ppsspp_config.h" #include "../gfx/gl_common.h" #if defined(USING_GLES2) -#if !defined(IOS) +#if !PPSSPP_PLATFORM(IOS) #include "EGL/egl.h" -#endif GLboolean gl3stubInit() { -#if !defined(IOS) #define FIND_PROC(s) s = (void*)eglGetProcAddress(#s) FIND_PROC(glReadBuffer); FIND_PROC(glDrawRangeElements); @@ -145,7 +144,6 @@ GLboolean gl3stubInit() { #undef FIND_PROC -#endif // IOS if (!glReadBuffer || !glDrawRangeElements || !glTexImage3D || @@ -257,8 +255,6 @@ GLboolean gl3stubInit() { return GL_TRUE; } -#if !defined(IOS) - /* Function pointer definitions */ GL_APICALL void (* GL_APIENTRY glReadBuffer) (GLenum mode); GL_APICALL void (* GL_APIENTRY glDrawRangeElements) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); @@ -379,6 +375,12 @@ GL_APICALL void (* GL_APIENTRY glBufferStorageEXT) (GLenum target, GLs /* OES_copy_image, etc. */ GL_APICALL void (* GL_APIENTRY glCopyImageSubDataOES) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +#else + +GLboolean gl3stubInit() { + return GL_TRUE; +} + #endif // IOS #endif // GLES2 diff --git a/ext/native/gfx_es2/gl3stub.h b/ext/native/gfx_es2/gl3stub.h index 843b1fb667..26b571b982 100644 --- a/ext/native/gfx_es2/gl3stub.h +++ b/ext/native/gfx_es2/gl3stub.h @@ -11,6 +11,8 @@ * - Added gl3stubInit() declaration */ +#include "ppsspp_config.h" + #if defined(USING_GLES2) #ifdef __cplusplus @@ -45,7 +47,7 @@ extern "C" { * otherwise. */ GLboolean gl3stubInit(); -#if !defined(IOS) +#if !PPSSPP_PLATFORM(IOS) /*------------------------------------------------------------------------- * Data type definitions