diff --git a/GL/draw.c b/GL/draw.c index 81d50f4..d3b00fe 100644 --- a/GL/draw.c +++ b/GL/draw.c @@ -1246,7 +1246,7 @@ void APIENTRY glEnableClientState(GLenum cap) { (ENABLED_VERTEX_ATTRIBUTES |= UV_ENABLED_FLAG); break; default: - _glKosThrowError(GL_INVALID_ENUM, "glEnableClientState"); + _glKosThrowError(GL_INVALID_ENUM, __func__); } } @@ -1269,7 +1269,7 @@ void APIENTRY glDisableClientState(GLenum cap) { (ENABLED_VERTEX_ATTRIBUTES &= ~UV_ENABLED_FLAG); break; default: - _glKosThrowError(GL_INVALID_ENUM, "glDisableClientState"); + _glKosThrowError(GL_INVALID_ENUM, __func__); } } diff --git a/GL/framebuffer.c b/GL/framebuffer.c index 9af7575..663a9c7 100644 --- a/GL/framebuffer.c +++ b/GL/framebuffer.c @@ -189,7 +189,7 @@ GLboolean _glCalculateAverageTexel(const GLubyte* src, const GLuint srcWidth, co *d1 = (r << 11 | g << 5 | b); } else { fprintf(stderr, "ERROR: Unsupported PVR format for mipmap generation"); - _glKosThrowError(GL_INVALID_OPERATION, "glGenerateMipmapEXT"); + _glKosThrowError(GL_INVALID_OPERATION, __func__); _glKosPrintError(); return GL_FALSE; } diff --git a/GL/texture.c b/GL/texture.c index 5eb7178..f8fe327 100644 --- a/GL/texture.c +++ b/GL/texture.c @@ -37,7 +37,7 @@ static TexturePalette* _initTexturePalette() { TexturePalette* palette = (TexturePalette*) malloc(sizeof(TexturePalette)); assert(palette); - memset(palette, 0x0, sizeof(TexturePalette)); + sq_clr(palette, (sizeof(TexturePalette) & 0xfffffffc) + 4); palette->bank = -1; return palette; }