mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-01 14:24:02 +00:00
Handle disabled display cleanly.
Otherwise we might accidentally match a vfb at 0. Fixes #6317.
This commit is contained in:
parent
abede77059
commit
5806df07b4
@ -678,12 +678,20 @@ namespace DX9 {
|
||||
|
||||
void FramebufferManagerDX9::CopyDisplayToOutput() {
|
||||
fbo_unbind();
|
||||
currentRenderVfb_ = 0;
|
||||
|
||||
if (displayFramebufPtr_ == 0) {
|
||||
DEBUG_LOG(SCEGE, "Display disabled, displaying only black");
|
||||
// No framebuffer to display! Clear to black.
|
||||
ClearBuffer();
|
||||
return;
|
||||
}
|
||||
|
||||
if (useBufferedRendering_) {
|
||||
// In buffered, we no longer clear the backbuffer before we start rendering.
|
||||
ClearBuffer();
|
||||
DXSetViewport(0, 0, PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight);
|
||||
}
|
||||
currentRenderVfb_ = 0;
|
||||
|
||||
u32 offsetX = 0;
|
||||
u32 offsetY = 0;
|
||||
|
@ -989,6 +989,15 @@ void FramebufferManager::CopyDisplayToOutput() {
|
||||
fbo_unbind();
|
||||
glstate.viewport.set(0, 0, pixelWidth_, pixelHeight_);
|
||||
|
||||
currentRenderVfb_ = 0;
|
||||
|
||||
if (displayFramebufPtr_ == 0) {
|
||||
DEBUG_LOG(SCEGE, "Display disabled, displaying only black");
|
||||
// No framebuffer to display! Clear to black.
|
||||
ClearBuffer();
|
||||
return;
|
||||
}
|
||||
|
||||
if (useBufferedRendering_) {
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
#ifdef USING_GLES2
|
||||
@ -1001,8 +1010,6 @@ void FramebufferManager::CopyDisplayToOutput() {
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
}
|
||||
|
||||
currentRenderVfb_ = 0;
|
||||
|
||||
u32 offsetX = 0;
|
||||
u32 offsetY = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user