Various cleanups from @mrneo

This commit is contained in:
Luke Benstead 2019-09-22 20:52:58 +01:00
parent c92cdc927c
commit 8f84cbb142
3 changed files with 4 additions and 4 deletions

View File

@ -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__);
}
}

View File

@ -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;
}

View File

@ -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;
}