From 2ed8c83ec3ef78d6cfd61b9401f7830fb7e1cf9a Mon Sep 17 00:00:00 2001 From: maelstrom Date: Mon, 11 Aug 2025 21:45:46 +0200 Subject: [PATCH] tempfix(editor): gl 3.3 and qsoundeffect not working on linux --- editor/main.cpp | 3 ++- editor/mainglwidget.cpp | 1 + editor/mainwindow.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/main.cpp b/editor/main.cpp index 433bafc..467148b 100644 --- a/editor/main.cpp +++ b/editor/main.cpp @@ -14,7 +14,8 @@ int main(int argc, char *argv[]) { QSurfaceFormat format; format.setSamples(4); - format.setVersion(3, 3); + // TODO: This is broken for some reason on Linux, Qt refuses to use any version newer than 3.2. Figure out why + // format.setVersion(3, 3); format.setProfile(QSurfaceFormat::CompatibilityProfile); // Valid only in OpenGL 3.2+, see: https://stackoverflow.com/a/70519392/16255372 QSurfaceFormat::setDefaultFormat(format); diff --git a/editor/mainglwidget.cpp b/editor/mainglwidget.cpp index 6d306da..b9b8c4f 100755 --- a/editor/mainglwidget.cpp +++ b/editor/mainglwidget.cpp @@ -46,6 +46,7 @@ void MainGLWidget::initializeGL() { } inline void playSound(QString path) { + return; // TODO: Fix pulseaudio bug causing stutters QSoundEffect *sound = new QSoundEffect; sound->setSource(QUrl::fromLocalFile(path)); sound->play(); diff --git a/editor/mainwindow.cpp b/editor/mainwindow.cpp index a422372..9de8b47 100644 --- a/editor/mainwindow.cpp +++ b/editor/mainwindow.cpp @@ -59,6 +59,7 @@ void logQtMessage(QtMsgType type, const QMessageLogContext &context, const QStri } inline void playSound(QString path) { + return; // TODO: Fix pulseaudio bug causing stutters QSoundEffect *sound = new QSoundEffect; sound->setSource(QUrl::fromLocalFile(path)); sound->play();