all repos — mgba @ 1929047896659a90d64858eb3a90c186a14d996d

mGBA Game Boy Advance Emulator

Qt: Use Format_RGBX8888 to avoid having to swap channels
Jeffrey Pfau jeffrey@endrift.com
Mon, 10 Aug 2015 22:15:50 -0700
commit

1929047896659a90d64858eb3a90c186a14d996d

parent

313877657f170245b5e4892af499db3768acf6ca

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -102,9 +102,9 @@ connect(m_controller, SIGNAL(stateLoaded(GBAThread*)), m_display, SLOT(forceDraw()));

connect(m_controller, SIGNAL(rewound(GBAThread*)), m_display, SLOT(forceDraw())); connect(m_controller, &GameController::gamePaused, [this]() { QImage currentImage(reinterpret_cast<const uchar*>(m_controller->drawContext()), VIDEO_HORIZONTAL_PIXELS, - VIDEO_VERTICAL_PIXELS, 1024, QImage::Format_RGB32); + VIDEO_VERTICAL_PIXELS, 1024, QImage::Format_RGBX8888); QPixmap pixmap; - pixmap.convertFromImage(currentImage.rgbSwapped()); + pixmap.convertFromImage(currentImage); m_screenWidget->setPixmap(pixmap); m_screenWidget->setLockAspectRatio(3, 2); });