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