mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-22 16:25:39 +00:00
MediaCapture: Fix OpenGL capture
This commit is contained in:
parent
c30c4a5d0a
commit
422a0a0ead
|
@ -1046,7 +1046,12 @@ ALWAYS_INLINE_RELEASE void MediaCaptureMF::ConvertVideoFrame(u8* dst, size_t dst
|
||||||
// need to convert rgba -> bgra, as well as flipping vertically
|
// need to convert rgba -> bgra, as well as flipping vertically
|
||||||
const u32 vector_width = 4;
|
const u32 vector_width = 4;
|
||||||
const u32 aligned_width = Common::AlignDownPow2(width, vector_width);
|
const u32 aligned_width = Common::AlignDownPow2(width, vector_width);
|
||||||
|
|
||||||
|
if (!g_gpu_device->UsesLowerLeftOrigin())
|
||||||
|
{
|
||||||
src += src_stride * (height - 1);
|
src += src_stride * (height - 1);
|
||||||
|
src_stride = static_cast<size_t>(-static_cast<std::make_signed_t<size_t>>(src_stride));
|
||||||
|
}
|
||||||
|
|
||||||
for (u32 remaining_rows = height;;)
|
for (u32 remaining_rows = height;;)
|
||||||
{
|
{
|
||||||
|
@ -1072,7 +1077,7 @@ ALWAYS_INLINE_RELEASE void MediaCaptureMF::ConvertVideoFrame(u8* dst, size_t dst
|
||||||
row_dst += sizeof(u32);
|
row_dst += sizeof(u32);
|
||||||
}
|
}
|
||||||
|
|
||||||
src -= src_stride;
|
src += src_stride;
|
||||||
dst += dst_stride;
|
dst += dst_stride;
|
||||||
|
|
||||||
remaining_rows--;
|
remaining_rows--;
|
||||||
|
|
Loading…
Reference in a new issue