Skip to content

Commit

Permalink
made vumetergl the default and simplified commandline option to disab…
Browse files Browse the repository at this point in the history
…le it
  • Loading branch information
m0dB committed Oct 3, 2022
1 parent f0ede0e commit 41625a6
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions src/util/cmdlineargs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,12 @@
#include "sources/soundsourceproxy.h"
#include "util/versionstore.h"

namespace {
bool useVuMeterGLDefault() {
// The QGLWidget derived WVuMeterGL provided better performance,
// particularly on macOS, but on linux with older Qt versions
// (tested with 5.12.3) we have segfaults as Qt seems to still
// be accessing the QGLWidget after deletion, when switching
// skins or on exit.
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 3) || defined(__APPLE__)
return true;
#else
return false;
#endif
}
} // namespace

CmdlineArgs::CmdlineArgs()
: m_startInFullscreen(false), // Initialize vars
m_midiDebug(false),
m_developer(false),
m_safeMode(false),
m_useVuMeterGL(useVuMeterGLDefault()),
m_useVuMeterGL(true),
m_debugAssertBreak(false),
m_settingsPathSet(false),
m_logLevel(mixxx::kLogLevelDefault),
Expand Down Expand Up @@ -113,12 +98,9 @@ warnings and errors to the console unless this is set properly.\n", stdout);
when a critical error occurs unless this is set properly.\n", stdout);
}
i++;
} else if (argv[i] == QString("--useVuMeterGL")) {
QString qs(i + 1 < argc ? argv[i + 1] : "");
if (qs != "yes" && qs != "no") {
fputs("\nExpected yes or no after --useVuMeterGL\n", stdout);
}
m_useVuMeterGL = (qs == "yes");
} else if (QString::fromLocal8Bit(argv[i]).contains(
"--disableVuMeterGL", Qt::CaseInsensitive)) {
m_useVuMeterGL = false;
} else if (QString::fromLocal8Bit(argv[i]).contains(
"--midiDebug", Qt::CaseInsensitive) ||
QString::fromLocal8Bit(argv[i]).contains(
Expand Down Expand Up @@ -178,14 +160,8 @@ void CmdlineArgs::printUsage() {
--safeMode Enables safe-mode. Disables OpenGL waveforms,\n\
and spinning vinyl widgets. Try this option if\n\
Mixxx is crashing on startup.\n\
\n",
stdout);
fprintf(stdout,
"\
--useVuMeterGL yes|no Use OpenGL VuMeter instead of standard.\n\
Default for your configuration is: %s\n",
(m_useVuMeterGL ? "yes" : "no"));
fputs("\
\n\
--disableVuMeterGL Do not use OpenGL vu meter.\n\
\n\
--locale LOCALE Use a custom locale for loading translations\n\
(e.g 'fr')\n\
Expand Down

0 comments on commit 41625a6

Please sign in to comment.