diff --git a/CMake/platforms/psp_defs.cmake b/CMake/platforms/psp_defs.cmake index 9e88b2c53..7fe770f4a 100644 --- a/CMake/platforms/psp_defs.cmake +++ b/CMake/platforms/psp_defs.cmake @@ -6,5 +6,5 @@ set(BUILD_TESTING OFF) set(PREFILL_PLAYER_NAME ON) set(NOEXIT ON) -set(DEFAULT_WIDTH 480) -set(DEFAULT_HEIGHT 272) +# Use lower resampling quality for FPS. +set(DEFAULT_AUDIO_RESAMPLING_QUALITY 2) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 51c3bcdad..a5e182bd0 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1149,7 +1149,7 @@ void DiabloInit() } } -#ifndef USE_SDL1 +#if !defined(USE_SDL1) && !defined(PSP) InitializeVirtualGamepad(); #endif diff --git a/Source/storm/storm_net.cpp b/Source/storm/storm_net.cpp index fff17ebae..e136557bb 100644 --- a/Source/storm/storm_net.cpp +++ b/Source/storm/storm_net.cpp @@ -23,10 +23,12 @@ namespace devilution { namespace { std::unique_ptr dvlnet_inst; bool GameIsPublic = {}; -thread_local uint32_t dwLastError = 0; #ifndef NONET +thread_local uint32_t dwLastError = 0; SdlMutex storm_net_mutex; +#else +uint32_t dwLastError = 0; #endif } // namespace diff --git a/Source/utils/file_util.cpp b/Source/utils/file_util.cpp index b6859a2ac..95f659e9d 100644 --- a/Source/utils/file_util.cpp +++ b/Source/utils/file_util.cpp @@ -31,6 +31,10 @@ #endif #endif +#ifdef PSP +#include +#endif + #if (_POSIX_C_SOURCE >= 200112L || defined(_BSD_SOURCE) || defined(__APPLE__)) && !defined(NXDK) #include #include @@ -396,7 +400,11 @@ void RemoveFile(const char *path) FILE *f = fopen(name.c_str(), "r+"); if (f != nullptr) { fclose(f); +#ifdef PSP + sceIoRemove(name.c_str()); +#else remove(name.c_str()); +#endif f = nullptr; LogVerbose("Removed file: {}", name); } else {