mirror of https://github.com/encounter/SDL.git
PSP: fixed build
This commit is contained in:
parent
3ea35fe5bb
commit
dd9b2daf8d
|
@ -1,6 +1,7 @@
|
||||||
TARGET_LIB = libSDL2.a
|
TARGET_LIB = libSDL2.a
|
||||||
OBJS= src/SDL.o \
|
OBJS= src/SDL.o \
|
||||||
src/SDL_assert.o \
|
src/SDL_assert.o \
|
||||||
|
src/SDL_dataqueue.o \
|
||||||
src/SDL_error.o \
|
src/SDL_error.o \
|
||||||
src/SDL_hints.o \
|
src/SDL_hints.o \
|
||||||
src/SDL_log.o \
|
src/SDL_log.o \
|
||||||
|
@ -15,6 +16,7 @@ OBJS= src/SDL.o \
|
||||||
src/audio/psp/SDL_pspaudio.o \
|
src/audio/psp/SDL_pspaudio.o \
|
||||||
src/cpuinfo/SDL_cpuinfo.o \
|
src/cpuinfo/SDL_cpuinfo.o \
|
||||||
src/events/SDL_clipboardevents.o \
|
src/events/SDL_clipboardevents.o \
|
||||||
|
src/events/SDL_displayevents.o \
|
||||||
src/events/SDL_dropevents.o \
|
src/events/SDL_dropevents.o \
|
||||||
src/events/SDL_events.o \
|
src/events/SDL_events.o \
|
||||||
src/events/SDL_gesture.o \
|
src/events/SDL_gesture.o \
|
||||||
|
@ -29,6 +31,7 @@ OBJS= src/SDL.o \
|
||||||
src/joystick/SDL_joystick.o \
|
src/joystick/SDL_joystick.o \
|
||||||
src/joystick/SDL_gamecontroller.o \
|
src/joystick/SDL_gamecontroller.o \
|
||||||
src/joystick/psp/SDL_sysjoystick.o \
|
src/joystick/psp/SDL_sysjoystick.o \
|
||||||
|
src/joystick/virtual/SDL_virtualjoystick.o \
|
||||||
src/power/SDL_power.o \
|
src/power/SDL_power.o \
|
||||||
src/power/psp/SDL_syspower.o \
|
src/power/psp/SDL_syspower.o \
|
||||||
src/filesystem/dummy/SDL_sysfilesystem.o \
|
src/filesystem/dummy/SDL_sysfilesystem.o \
|
||||||
|
@ -77,10 +80,12 @@ OBJS= src/SDL.o \
|
||||||
src/video/SDL_stretch.o \
|
src/video/SDL_stretch.o \
|
||||||
src/video/SDL_surface.o \
|
src/video/SDL_surface.o \
|
||||||
src/video/SDL_video.o \
|
src/video/SDL_video.o \
|
||||||
|
src/video/SDL_yuv.o \
|
||||||
src/video/psp/SDL_pspevents.o \
|
src/video/psp/SDL_pspevents.o \
|
||||||
src/video/psp/SDL_pspvideo.o \
|
src/video/psp/SDL_pspvideo.o \
|
||||||
src/video/psp/SDL_pspgl.o \
|
src/video/psp/SDL_pspgl.o \
|
||||||
src/video/psp/SDL_pspmouse.o
|
src/video/psp/SDL_pspmouse.o \
|
||||||
|
src/video/yuv2rgb/yuv_rgb.o
|
||||||
|
|
||||||
INCDIR = ./include
|
INCDIR = ./include
|
||||||
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
|
||||||
|
|
|
@ -56,6 +56,15 @@ static unsigned int __attribute__((aligned(16))) DisplayList[262144];
|
||||||
#define COL4444(r,g,b,a) ((r>>4) | ((g>>4)<<4) | ((b>>4)<<8) | ((a>>4)<<12))
|
#define COL4444(r,g,b,a) ((r>>4) | ((g>>4)<<4) | ((b>>4)<<8) | ((a>>4)<<12))
|
||||||
#define COL8888(r,g,b,a) ((r) | ((g)<<8) | ((b)<<16) | ((a)<<24))
|
#define COL8888(r,g,b,a) ((r) | ((g)<<8) | ((b)<<16) | ((a)<<24))
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
SDL_bool viewport_dirty;
|
||||||
|
SDL_Rect viewport;
|
||||||
|
SDL_bool cliprect_enabled_dirty;
|
||||||
|
SDL_bool cliprect_enabled;
|
||||||
|
SDL_bool cliprect_dirty;
|
||||||
|
SDL_Rect cliprect;
|
||||||
|
} PSP_DrawStateCache;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -70,6 +79,7 @@ typedef struct
|
||||||
unsigned int currentColor;
|
unsigned int currentColor;
|
||||||
int currentBlendMode;
|
int currentBlendMode;
|
||||||
|
|
||||||
|
PSP_DrawStateCache drawstate;
|
||||||
} PSP_RenderData;
|
} PSP_RenderData;
|
||||||
|
|
||||||
|
|
||||||
|
@ -346,12 +356,6 @@ PSP_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
PSP_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
|
|
||||||
{
|
|
||||||
return SDL_Unsupported();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TextureActivate(SDL_Texture * texture)
|
TextureActivate(SDL_Texture * texture)
|
||||||
{
|
{
|
||||||
|
@ -373,6 +377,9 @@ TextureActivate(SDL_Texture * texture)
|
||||||
sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
|
sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
PSP_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||||
|
const SDL_Rect * rect, void **pixels, int *pitch);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
PSP_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||||
|
@ -469,7 +476,7 @@ PSP_QueueDrawPoints(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_F
|
||||||
static int
|
static int
|
||||||
PSP_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
|
PSP_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const SDL_FRect * rects, int count)
|
||||||
{
|
{
|
||||||
VertV *verts = (GLfloat *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertV), 4, &cmd->data.draw.first);
|
VertV *verts = (VertV *) SDL_AllocateRenderVertices(renderer, count * 2 * sizeof (VertV), 4, &cmd->data.draw.first);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!verts) {
|
if (!verts) {
|
||||||
|
@ -691,7 +698,6 @@ static int
|
||||||
PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
|
PSP_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize)
|
||||||
{
|
{
|
||||||
PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
|
PSP_RenderData *data = (PSP_RenderData *) renderer->driverdata;
|
||||||
size_t i;
|
|
||||||
|
|
||||||
StartDrawing(renderer);
|
StartDrawing(renderer);
|
||||||
|
|
||||||
|
@ -952,7 +958,6 @@ PSP_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
|
|
||||||
renderer->WindowEvent = PSP_WindowEvent;
|
renderer->WindowEvent = PSP_WindowEvent;
|
||||||
renderer->CreateTexture = PSP_CreateTexture;
|
renderer->CreateTexture = PSP_CreateTexture;
|
||||||
renderer->SetTextureColorMod = PSP_SetTextureColorMod;
|
|
||||||
renderer->UpdateTexture = PSP_UpdateTexture;
|
renderer->UpdateTexture = PSP_UpdateTexture;
|
||||||
renderer->LockTexture = PSP_LockTexture;
|
renderer->LockTexture = PSP_LockTexture;
|
||||||
renderer->UnlockTexture = PSP_UnlockTexture;
|
renderer->UnlockTexture = PSP_UnlockTexture;
|
||||||
|
|
Loading…
Reference in New Issue