Fix PSP build issues

This commit is contained in:
2025-11-09 13:23:15 -06:00
parent 5a8710cc76
commit 587d716aae
5 changed files with 15 additions and 5 deletions

View File

@@ -10,8 +10,8 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
if(NOT DEFINED DUSK_TARGET_SYSTEM) if(NOT DEFINED DUSK_TARGET_SYSTEM)
set(DUSK_TARGET_SYSTEM "linux") # set(DUSK_TARGET_SYSTEM "linux")
# set(DUSK_TARGET_SYSTEM "psp") set(DUSK_TARGET_SYSTEM "psp")
endif() endif()
# Prep cache # Prep cache

View File

@@ -31,9 +31,9 @@ if(NOT TARGET pspsdk)
if(NOT PSPSDK_PSP_GCC) if(NOT PSPSDK_PSP_GCC)
message(STATUS "psp-gcc not found in system paths. Downloading PSPSDK tarball...") message(STATUS "psp-gcc not found in system paths. Downloading PSPSDK tarball...")
file(DOWNLOAD file(DOWNLOAD
"https://github.com/pspdev/pspdev/releases/latest/download/pspdev-ubuntu-latest-x86_64.tar.gz" "https://github.com/pspdev/pspdev/releases/tag/v20251101/download/pspdev-ubuntu-latest-x86_64.tar.gz"
"${CMAKE_BINARY_DIR}/pspsdk.tar.gz" "${CMAKE_BINARY_DIR}/pspsdk.tar.gz"
EXPECTED_HASH SHA256=2befe2ad83afd88934c106dbe98a72a7ad5ede8d272b7f1e79fda256a22f1062 EXPECTED_HASH SHA256=8f8abc2a3008ec1e97c6ba706152a45e4f031c8d10db2102c3c68ce24fa6fcaf
SHOW_PROGRESS SHOW_PROGRESS
) )

View File

@@ -33,6 +33,8 @@ elseif(DUSK_TARGET_SYSTEM STREQUAL "psp")
DISPLAY_SDL2=1 DISPLAY_SDL2=1
DISPLAY_WINDOW_WIDTH_DEFAULT=480 DISPLAY_WINDOW_WIDTH_DEFAULT=480
DISPLAY_WINDOW_HEIGHT_DEFAULT=272 DISPLAY_WINDOW_HEIGHT_DEFAULT=272
DISPLAY_WIDTH=480
DISPLAY_HEIGHT=272
DISPLAY_SIZE_DYNAMIC=0 DISPLAY_SIZE_DYNAMIC=0
) )
endif() endif()

View File

@@ -21,6 +21,15 @@
#error "Need to specify display backend." #error "Need to specify display backend."
#endif #endif
#if DISPLAY_SIZE_DYNAMIC == 0
#ifndef DISPLAY_WIDTH
#error "DISPLAY_WIDTH must be defined when DISPLAY_SIZE_DYNAMIC is 0."
#endif
#ifndef DISPLAY_HEIGHT
#error "DISPLAY_HEIGHT must be defined when DISPLAY_SIZE_DYNAMIC is 0."
#endif
#endif
#ifndef DISPLAY_WINDOW_WIDTH_DEFAULT #ifndef DISPLAY_WINDOW_WIDTH_DEFAULT
#error "DISPLAY_WINDOW_WIDTH_DEFAULT must be defined." #error "DISPLAY_WINDOW_WIDTH_DEFAULT must be defined."
#endif #endif

View File

@@ -180,7 +180,6 @@ void sceneMapRenderMap() {
max[1] = min[1] + (CHUNK_HEIGHT * TILE_SIZE); max[1] = min[1] + (CHUNK_HEIGHT * TILE_SIZE);
max[2] = min[2]; max[2] = min[2];
color_t color = COLOR_WHITE; color_t color = COLOR_WHITE;
if(chunk->x % 2 == 0) { if(chunk->x % 2 == 0) {
color = (chunk->y % 2 == 0) ? COLOR_BLACK : COLOR_WHITE; color = (chunk->y % 2 == 0) ? COLOR_BLACK : COLOR_WHITE;