mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix camera image being upside-down sometimes (fixes #829 again)
This commit is contained in:
parent
f636b88f27
commit
5a50f47bf7
1
CHANGES
1
CHANGES
|
@ -65,6 +65,7 @@ Other fixes:
|
|||
- Qt: Fix a race condition in the frame inspector
|
||||
- Qt: Add dummy English translation file (fixes mgba.io/i/1469)
|
||||
- Qt: Fix Battle Chip view not displaying chips on some DPI settings
|
||||
- Qt: Fix camera image being upside-down sometimes (fixes mgba.io/i/829 again)
|
||||
- mGUI: Fix closing down a game if an exit is signalled
|
||||
- mVL: Fix injecting accidentally draining non-injection buffer
|
||||
- SM83: Simplify register pair access on big endian
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "VideoDumper.h"
|
||||
|
||||
#include <QImage>
|
||||
#include <QVideoSurfaceFormat>
|
||||
|
||||
using namespace QGBA;
|
||||
|
||||
|
@ -40,13 +41,11 @@ bool VideoDumper::present(const QVideoFrame& frame) {
|
|||
QImage image(bits, mappedFrame.width(), mappedFrame.height(), mappedFrame.bytesPerLine(), format);
|
||||
if (swap) {
|
||||
image = image.rgbSwapped();
|
||||
} else {
|
||||
#ifdef Q_OS_WIN
|
||||
// Qt's DirectShow plug-in is pretty dang buggy
|
||||
image = image.mirrored();
|
||||
#else
|
||||
} else if (surfaceFormat().scanLineDirection() != QVideoSurfaceFormat::BottomToTop) {
|
||||
image = image.copy(); // Create a deep copy of the bits
|
||||
#endif
|
||||
}
|
||||
if (surfaceFormat().scanLineDirection() == QVideoSurfaceFormat::BottomToTop) {
|
||||
image = image.mirrored();
|
||||
}
|
||||
mappedFrame.unmap();
|
||||
emit imageAvailable(image);
|
||||
|
|
Loading…
Reference in New Issue