From ce6a8d25167bd206bcbe5edbed254d079622d2d4 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 30 Nov 2023 19:12:21 +1100 Subject: [PATCH] PS3: Fix to compile again --- misc/ps3/Makefile | 4 ++-- readme.md | 2 +- src/Graphics_PS3.c | 2 +- src/Window_PS3.c | 15 +++++++++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/misc/ps3/Makefile b/misc/ps3/Makefile index e859df91f..5a851e3b4 100644 --- a/misc/ps3/Makefile +++ b/misc/ps3/Makefile @@ -17,8 +17,8 @@ include $(PS3DEV)/ppu_rules #--------------------------------------------------------------------------------- TARGET := ClassiCube-PS3 BUILD := build-ps3 -SOURCES := src -INCLUDES := +SOURCES := src third_party/bearssl/src +INCLUDES := third_party/bearssl/inc SHADERS := misc/ps3 TITLE := ClassiCube diff --git a/readme.md b/readme.md index 2eeba5b54..9769566c8 100644 --- a/readme.md +++ b/readme.md @@ -82,7 +82,7 @@ And also runs on: * PSP - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/psp), **untested on real hardware**) * PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita), **untested on real hardware**) * Xbox - unfinished, major rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**) -* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**) +* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **untested on real hardware**) * Nintendo 64 - unfinished, major rendering issues # Compiling diff --git a/src/Graphics_PS3.c b/src/Graphics_PS3.c index 4adda6ae2..50fc52e4c 100644 --- a/src/Graphics_PS3.c +++ b/src/Graphics_PS3.c @@ -531,7 +531,7 @@ void Gfx_UnlockVb(GfxResourceID vb) { } -static GfxResourceID Gfx_AllocDynamicVb(VertexFormat fmt, int maxVertices) +static GfxResourceID Gfx_AllocDynamicVb(VertexFormat fmt, int maxVertices) { return rsxMemalign(128, maxVertices * strideSizes[fmt]); } diff --git a/src/Window_PS3.c b/src/Window_PS3.c index a624639b0..2dcc176a1 100644 --- a/src/Window_PS3.c +++ b/src/Window_PS3.c @@ -12,11 +12,15 @@ #include "ExtMath.h" #include "Logger.h" #include +#include #include #include + static cc_bool launcherMode; static padInfo pad_info; static padData pad_data; +static KbInfo kb_info; +static KbData kb_data; struct _DisplayData DisplayInfo; struct _WinData WindowInfo; @@ -57,7 +61,8 @@ void Window_Init(void) { DisplayInfo.ContentOffsetX = 10; DisplayInfo.ContentOffsetY = 10; - ioPadInit(7); + ioPadInit(MAX_PORT_NUM); + //ioKbInit(MAX_KB_PORT_NUM); } void Window_Create2D(int width, int height) { @@ -133,13 +138,19 @@ static void ProcessPadInput(double delta, padData* pad) { } void Window_ProcessEvents(double delta) { - ioPadGetInfo(&pad_info); Input.JoystickMovement = false; + ioPadGetInfo(&pad_info); if (pad_info.status[0]) { ioPadGetData(0, &pad_data); ProcessPadInput(delta, &pad_data); } + + //ioKbGetInfo(&kb_info); + //if (kb_info.status[0]) { + // int RES = ioKbRead(0, &kb_data); + // Platform_Log1("RES: %i", &RES); + //} } void Cursor_SetPosition(int x, int y) { } // Makes no sense for PS Vita