Avoid transparency/whiteness effects on Wayland and macOS
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#include "qt_hardwarerenderer.hpp"
|
#include "qt_hardwarerenderer.hpp"
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <86box/86box.h>
|
#include <86box/86box.h>
|
||||||
@@ -26,7 +27,7 @@ void HardwareRenderer::setRenderType(RenderType type) {
|
|||||||
format.setRenderableType(QSurfaceFormat::OpenGL);
|
format.setRenderableType(QSurfaceFormat::OpenGL);
|
||||||
break;
|
break;
|
||||||
case RenderType::OpenGLES:
|
case RenderType::OpenGLES:
|
||||||
setTextureFormat(GL_RGBA);
|
setTextureFormat((QApplication::platformName().contains("wayland") || QApplication::platformName() == "cocoa") ? GL_RGB : GL_RGBA);
|
||||||
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
format.setRenderableType(QSurfaceFormat::OpenGLES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user