mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 16:23:35 +01:00
Workaround for a crash found in #12358 on older devices
This commit is contained in:
1 parent
25634d2df2
commit
9e7625c74b
2 files changed
+13
-4
No files matched your search
@@ -458,10 +458,15 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
|
||||
|
||||
uint32_t bindOffset;
|
||||
GLRBuffer *buffer;
|
||||
void *dest = drawEngineGL_->GetPushVertexBuffer()->Push(sizeof(verts), &bindOffset, &buffer);
|
||||
memcpy(dest, verts, sizeof(verts));
|
||||
render_->BindVertexBuffer(simple2DInputLayout_, buffer, bindOffset);
|
||||
render_->Draw(GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
// Workaround: This might accidentally get called from ReportScreen screenshot-taking, and in that case
|
||||
// the push buffer is not mapped. This only happens if framebuffer blit support is not available.
|
||||
if (drawEngineGL_->GetPushVertexBuffer()->IsReady()) {
|
||||
void *dest = drawEngineGL_->GetPushVertexBuffer()->Push(sizeof(verts), &bindOffset, &buffer);
|
||||
memcpy(dest, verts, sizeof(verts));
|
||||
render_->BindVertexBuffer(simple2DInputLayout_, buffer, bindOffset);
|
||||
render_->Draw(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
}
|
||||
|
||||
void FramebufferManagerGLES::ReformatFramebufferFrom(VirtualFramebuffer *vfb, GEBufferFormat old) {
|
||||
|
||||
Reference in new issue
Block a user