Skip to content

Commit

Permalink
Fix blending issue on some systems
Browse files Browse the repository at this point in the history
  • Loading branch information
calc84maniac committed Jun 26, 2024
1 parent 7904462 commit cd31480
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions gui/qt/lcdwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,20 @@ bool LCDWidget::draw() {
c.fillRect(c.window(), QColor(0, 0, 0, (1.0f - backlight.factor) * 255.0f));
}
if (m_responseMode) {
QPainter c;
if (lcd.useDma && panel.params.GATECTRL.SM) {
m_blendedFrame.reinterpretAsFormat(QImage::Format_RGBA8888_Premultiplied);
c.begin(&m_blendedFrame);
c.setCompositionMode(QPainter::CompositionMode_DestinationIn);
c.drawImage(QPoint(0, 0), m_interlaceAlpha);
c.setCompositionMode(QPainter::CompositionMode_DestinationOver);
c.drawImage(QPoint(0, 0), m_renderedFrame);
c.end();
{
QPainter c(&m_blendedFrame);
c.setCompositionMode(QPainter::CompositionMode_DestinationIn);
c.drawImage(QPoint(0, 0), m_interlaceAlpha);
c.setCompositionMode(QPainter::CompositionMode_DestinationOver);
c.drawImage(QPoint(0, 0), m_renderedFrame);
}
m_blendedFrame.reinterpretAsFormat(QImage::Format_RGBX8888);
} else {
c.begin(&m_blendedFrame);
QPainter c(&m_blendedFrame);
c.setOpacity(0.6);
c.drawImage(QPoint(0, 0), m_renderedFrame);
c.end();
}
m_currFrame = &m_blendedFrame;
} else {
Expand Down

0 comments on commit cd31480

Please sign in to comment.