diff --git a/QtScrcpy/main.cpp b/QtScrcpy/main.cpp index a21e791..db8b2ba 100644 --- a/QtScrcpy/main.cpp +++ b/QtScrcpy/main.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "dialog.h" #include "stream.h" @@ -49,6 +50,19 @@ int main(int argc, char *argv[]) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QSurfaceFormat varFormat = QSurfaceFormat::defaultFormat(); + varFormat.setVersion(2, 0); + varFormat.setProfile(QSurfaceFormat::NoProfile); + /* + varFormat.setSamples(4); + varFormat.setAlphaBufferSize(8); + varFormat.setBlueBufferSize(8); + varFormat.setRedBufferSize(8); + varFormat.setGreenBufferSize(8); + varFormat.setDepthBufferSize(24); + */ + QSurfaceFormat::setDefaultFormat(varFormat); + g_oldMessageHandler = qInstallMessageHandler(myMessageOutput); Stream::init(); QApplication a(argc, argv);