Force all processed screenshots to be opaque

This commit is contained in:
Cacodemon345
2025-09-17 02:52:26 +06:00
committed by GitHub
parent 81e4d95fc7
commit e29d76f946

View File

@@ -1713,6 +1713,11 @@ OpenGLRenderer::render()
glw.glFinish();
glw.glReadPixels(window_rect.x, window_rect.y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, rgba);
for (uint32_t idx = 0; idx < (uint32_t)(width * height); idx++)
{
rgba[idx * 4] = 255;
}
QImage image(rgba, width, height, QImage::Format_RGBA8888);
image.mirrored(false, true).save(path, "png");
monitors[r_monitor_index].mon_screenshots--;