mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix possible framebuffer binding bug in EmuScreen
This commit is contained in:
parent
144f2884bc
commit
3d31b4ac4c
@ -106,6 +106,7 @@ public:
|
||||
}
|
||||
void NotifyPresent() {
|
||||
// Something else did the present, skipping PresentationCommon.
|
||||
// If you haven't called BindFramebufferAsRenderTarget, you must not set this.
|
||||
presentedThisFrame_ = true;
|
||||
}
|
||||
|
||||
|
@ -199,6 +199,8 @@ inline uint32_t RoundUpTo4(uint32_t value) {
|
||||
}
|
||||
|
||||
void ReplacedTexture::Prepare(VFSBackend *vfs) {
|
||||
_assert_(vfs != nullptr);
|
||||
|
||||
this->vfs_ = vfs;
|
||||
|
||||
std::unique_lock<std::mutex> lock(lock_);
|
||||
@ -295,6 +297,11 @@ ReplacedTexture::LoadLevelResult ReplacedTexture::LoadLevelData(VFSFileReference
|
||||
data_.resize(mipLevel + 1);
|
||||
}
|
||||
|
||||
if (!vfs_) {
|
||||
ERROR_LOG(Log::G3D, "Unexpected null vfs_ pointer in LoadLevelData");
|
||||
return LoadLevelResult::LOAD_ERROR;
|
||||
}
|
||||
|
||||
ReplacedTextureLevel level;
|
||||
size_t fileSize;
|
||||
VFSOpenFile *openFile = vfs_->OpenFileForRead(fileRef, &fileSize);
|
||||
|
@ -1464,8 +1464,8 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
if (!framebufferBound && PSP_IsInited()) {
|
||||
// draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, clearColor }, "EmuScreen_Stepping");
|
||||
gpu->CopyDisplayToOutput(true);
|
||||
framebufferBound = true;
|
||||
}
|
||||
framebufferBound = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user