Rendering on PSP again.

This commit is contained in:
2025-09-02 21:14:07 -05:00
parent 8de12da1ec
commit 87f18d0e13
13 changed files with 82 additions and 26 deletions

View File

@@ -51,6 +51,7 @@ errorret_t displayInit(void) {
glShadeModel(GL_SMOOTH); // Fixes color on PSP?
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glEnableClientState(GL_COLOR_ARRAY);// To confirm: every frame on PSP?
@@ -82,7 +83,12 @@ errorret_t displayUpdate(void) {
// TODO: move to framebuffer component
int32_t windowWidth, windowHeight;
SDL_GetWindowSize(DISPLAY.window, &windowWidth, &windowHeight);
#if PSP
windowWidth = DISPLAY_WINDOW_WIDTH_DEFAULT;
windowHeight = DISPLAY_WINDOW_HEIGHT_DEFAULT;
#else
SDL_GetWindowSize(DISPLAY.window, &windowWidth, &windowHeight);
#endif
glViewport(0, 0, windowWidth, windowHeight);
#endif