Skip to content

Commit

Permalink
GL: fix segfault in GLGSRender::flip
Browse files Browse the repository at this point in the history
  • Loading branch information
Megamouse committed Mar 27, 2024
1 parent efbf044 commit 6a2e6ec
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion rpcs3/Emu/RSX/GL/GLPresent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,21 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
}
}

if (!image_to_flip2)
{
images.resize(1u);
}

gl::screen.bind();
m_video_output_pass.run(cmd, areau(aspect_ratio), images.map(FN(x->id())), gamma, limited_range, avconfig.stereo_mode, filter);

auto mapped = images.map(FN(x->id()));

if (mapped.size() == 1)
{
mapped.push_back(GL_NONE);
}

m_video_output_pass.run(cmd, areau(aspect_ratio), mapped, gamma, limited_range, avconfig.stereo_mode, filter);
}
}

Expand Down

0 comments on commit 6a2e6ec

Please sign in to comment.