Renderer fixed.

This commit is contained in:
stdgregwar 2020-12-26 12:46:07 +01:00
parent 38b9ddb067
commit f2d5b3dddc
3 changed files with 20 additions and 1 deletions

16
Makefile.main.psp Normal file
View File

@ -0,0 +1,16 @@
TARGET_LIB = libSDL2main.a
OBJS= src/main/psp/SDL_psp_main.o
INCDIR = ./include
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lGL -lGLU -lglut -lz \
-lpspvfpu -lpsphprm -lpspsdk -lpspctrl -lpspumd -lpsprtc -lpsppower -lpspgum -lpspgu -lpspaudiolib -lpspaudio -lpsphttp -lpspssl -lpspwlan \
-lpspnet_adhocmatching -lpspnet_adhoc -lpspnet_adhocctl -lm -lpspvram
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

View File

@ -24,6 +24,7 @@
*/
PSP_MODULE_INFO("SDL App", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU | THREAD_ATTR_USER);
int sdl_psp_exit_callback(int arg1, int arg2, void *common)
{

View File

@ -568,7 +568,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
cmd->data.draw.count = count;
verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * sizeof (VertTV), 4, &cmd->data.draw.first);
verts = (VertTV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertTV), 4, &cmd->data.draw.first);
if (!verts) {
return -1;
}
@ -586,6 +586,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
verts->x = curX;
verts->y = y;
verts->z = 0;
verts++;
curU += sourceWidth;
curX += polyWidth;
@ -595,6 +596,7 @@ PSP_QueueCopy(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * tex
verts->x = curX;
verts->y = (y + height);
verts->z = 0;
verts++;
}
}