CEmu icon indicating copy to clipboard operation
CEmu copied to clipboard

Screenshots/recordings should be affected by screen brightness

Open runer112 opened this issue 4 years ago • 2 comments

  • [x] Screenshots
  • [ ] APNG recordings

runer112 avatar Jul 25 '19 17:07 runer112

Current implementation draws a black layer with alpha on top of the raw image, and only the raw image is used for screenshots and captures.

Potential solution: use the context painted images/bytes instead of the initial raw image?

adriweb avatar Jul 25 '19 17:07 adriweb

For screenshots, it's trivial, LCDWidget::getImage() should be:

    QPixmap pixmap(size());
    render(&pixmap);
    return pixmap.toImage();

instead of

    m_mutex.lock();
    QImage ret(m_image);
    m_mutex.unlock();
    return ret;

I'll commit that since it doesn't hurt (and also removes the mutex lock), but the problem is much harder if we want to fix that for APNG recordings, since apng_add_frame is called within LCDWidget::draw, and I don't think we want to (which may not be up to date at this point anyway, there is an event that's fired in it to update the widget later on)

adriweb avatar Jul 25 '19 18:07 adriweb