Crashfix, warning fix, cleanup

This commit is contained in:
Henrik Rydgård 2024-10-22 14:15:47 +02:00
parent 3a4b27b086
commit b10c4f7fae
3 changed files with 8 additions and 9 deletions

View File

@ -209,12 +209,9 @@ void SaveFileInfo::DoState(PointerWrap &p)
SavedataParam::SavedataParam() { }
void SavedataParam::Init()
{
if (!pspFileSystem.GetFileInfo(savePath).exists)
{
pspFileSystem.MkDir(savePath);
}
void SavedataParam::Init() {
// If the folder already exists, this is a no-op.
pspFileSystem.MkDir(savePath);
// Create a nomedia file to hide save icons form Android image viewer
#if PPSSPP_PLATFORM(ANDROID)
int handle = pspFileSystem.OpenFile(savePath + ".nomedia", (FileAccess)(FILEACCESS_CREATE | FILEACCESS_WRITE), 0);
@ -459,7 +456,7 @@ int SavedataParam::Save(SceUtilitySavedataParam* param, const std::string &saveD
}
}
u8* cryptedData = 0;
u8* cryptedData = nullptr;
int cryptedSize = 0;
u8 cryptedHash[0x10]{};
// Encrypt save.

View File

@ -659,7 +659,9 @@ void SoftGPU::CopyDisplayToOutput(bool reallyDirty) {
void SoftGPU::BeginHostFrame() {
GPUCommon::BeginHostFrame();
presentation_->BeginFrame();
if (presentation_) {
presentation_->BeginFrame();
}
}
bool SoftGPU::PresentedThisFrame() const {

View File

@ -1521,7 +1521,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
Draw::BackendState state = draw->GetCurrentBackendState();
// We allow if !state.valid, that means it's not the Vulkan backend.
_assert_msg_(!state.valid || state.passes >= 1, "skipB: %d sw: %d mode: %d back: %d", (int)skipBufferEffects, (int)g_Config.bSoftwareRendering, mode, (int)g_Config.iGPUBackend);
_assert_msg_(!state.valid || state.passes >= 1, "skipB: %d sw: %d mode: %d back: %d", (int)skipBufferEffects, (int)g_Config.bSoftwareRendering, (int)mode, (int)g_Config.iGPUBackend);
screenManager()->getUIContext()->BeginFrame();