Merge pull request #20455 from hrydgard/post-release-fixes

Misc fixes
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2025-06-06 11:32:16 +02:00
commit 96761197ca
8 files changed
+16 -16

No files matched your search

+3 -1
View File
@@ -98,7 +98,9 @@ size_t DirectoryReader::Read(VFSOpenFile *vfsOpenFile, void *buffer, size_t leng
void DirectoryReader::CloseFile(VFSOpenFile *vfsOpenFile) {
DirectoryReaderOpenFile *openFile = (DirectoryReaderOpenFile *)vfsOpenFile;
_dbg_assert_(openFile->file != nullptr);
fclose(openFile->file);
if (openFile->file) {
fclose(openFile->file);
}
openFile->file = nullptr;
delete openFile;
}
+1 -1
View File
@@ -72,7 +72,7 @@ bool RequestManager::MakeSystemRequest(SystemRequestType type, RequesterToken to
callbackMap_[requestId] = { callback, failedCallback, token };
}
INFO_LOG(Log::System, "Making system request %s: id %d", RequestTypeAsString(type), requestId);
DEBUG_LOG(Log::System, "Making system request %s: id %d", RequestTypeAsString(type), requestId);
std::string p1(param1);
std::string p2(param2);
// TODO: Convert to string_view
+3
View File
@@ -1031,9 +1031,12 @@ int Atrac2::DecodeLowLevel(const u8 *srcData, int *bytesConsumed, s16 *dstData,
bool success = decoder_->Decode(srcData, info.sampleSize, bytesConsumed, channels, dstData, &outSamples);
if (!success) {
ERROR_LOG(Log::ME, "Low level decoding failed: sampleSize: %d bytesConsumed: %d", info.sampleSize, *bytesConsumed);
// We proceed anyway, see issue #20452
/*
*bytesConsumed = 0;
*bytesWritten = 0;
return SCE_ERROR_ATRAC_API_FAIL; // need to check what return value we get here.
*/
}
*bytesWritten = outSamples * channels * sizeof(int16_t);
// TODO: Possibly return a decode error on bad data.
+2 -1
View File
@@ -59,6 +59,7 @@ static void SplitSV(std::string_view strv, char delim, bool removeWhiteSpace, st
}
}
// Call this with the mutex locked.
void GameDB::LoadIfNeeded() {
if (loaded_) {
// Already loaded
@@ -143,7 +144,7 @@ bool GameDB::GetGameInfos(std::string_view id, std::vector<GameDBInfo> *infos) {
LoadIfNeeded();
for (const auto &line : lines_) {
for (const auto serial : line.serials) {
for (const auto &serial : line.serials) {
// Ignore version and stuff for now
if (IDMatches(id, serial)) {
GameDBInfo info;
-2
View File
@@ -473,7 +473,6 @@ ReplacedTexture::LoadLevelResult ReplacedTexture::LoadLevelData(VFSFileReference
basist::ktx2_transcoder transcoder;
if (!transcoder.init(buffer.data(), (int)buffer.size())) {
WARN_LOG(Log::TexReplacement, "Error reading KTX file");
vfs_->CloseFile(openFile);
return LoadLevelResult::LOAD_ERROR;
}
@@ -513,7 +512,6 @@ ReplacedTexture::LoadLevelResult ReplacedTexture::LoadLevelData(VFSFileReference
}
} else {
WARN_LOG(Log::TexReplacement, "PPSSPP currently only supports KTX for basis/UASTC textures. This may change in the future.");
vfs_->CloseFile(openFile);
return LoadLevelResult::LOAD_ERROR;
}
+3 -3
View File
@@ -304,7 +304,7 @@ void DrawCrashDump(UIContext *ctx, const Path &gamePath) {
if (Reporting::HasCRC(gamePath)) {
u32 crc = Reporting::RetrieveCRC(gamePath);
std::vector<GameDBInfo> dbInfos;
if (g_gameDB.GetGameInfos(discID, &dbInfos)) {
if (discID.size() >= 9 && g_gameDB.GetGameInfos(discID, &dbInfos)) {
for (auto &dbInfo : dbInfos) {
if (dbInfo.crc == crc) {
isoOK = true;
@@ -329,9 +329,9 @@ void DrawCrashDump(UIContext *ctx, const Path &gamePath) {
// TODO: Draw a lot more information. Full register set, and so on.
#ifdef _DEBUG
char build[] = "debug";
const char * const build = "debug";
#else
char build[] = "release";
const char * const build = "release";
#endif
std::string sysName = System_GetProperty(SYSPROP_NAME);
+1 -7
View File
@@ -1471,15 +1471,9 @@ void EmuScreen::update() {
bool EmuScreen::checkPowerDown() {
// This is for handling things like sceKernelExitGame().
if (coreState == CORE_POWERDOWN && PSP_GetBootState() == BootState::Complete && !bootPending_) {
bool shutdown = false;
if (PSP_IsInited()) {
Achievements::UnloadGame();
PSP_Shutdown(true);
shutdown = true;
}
INFO_LOG(Log::System, "SELF-POWERDOWN!");
screenManager()->switchScreen(new MainScreen());
return shutdown;
return true;
}
return false;
}
+3 -1
View File
@@ -218,7 +218,9 @@ UI::EventReturn InstallZipScreen::OnInstall(UI::EventParams &params) {
}
if (g_GameManager.InstallZipOnThread(task)) {
installStarted_ = true;
playChoice_->SetEnabled(false); // need to exit this screen to played the installed one. We could make this smarter.
if (playChoice_) {
playChoice_->SetEnabled(false); // need to exit this screen to played the installed one. We could make this smarter.
}
if (installChoice_) {
installChoice_->SetEnabled(false);
}