Skip to content

Commit

Permalink
option to use the legacy aka non-glsl spinny
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB committed Sep 17, 2023
1 parent b1f1c07 commit ee90380
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/skin/legacy/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,8 @@ QWidget* LegacySkinParser::parseSpinny(const QDomElement& node) {
WSpinnyBase* pSpinny;
if (qApp->platformName() == QLatin1String("xcb")) {
#ifdef MIXXX_USE_QOPENGL
if (pWaveformWidgetFactory->isOpenGlShaderAvailable()) {
if (pWaveformWidgetFactory->isOpenGlShaderAvailable() &&
!CmdlineArgs::Instance().getUseLegacySpinny()) {
pSpinny = new WSpinnyGLSL(nullptr, group, m_pConfig, m_pVCManager, pPlayer);
} else
#endif
Expand All @@ -1320,7 +1321,8 @@ QWidget* LegacySkinParser::parseSpinny(const QDomElement& node) {
pSpinny->setParent(m_pParent);
} else {
#ifdef MIXXX_USE_QOPENGL
if (pWaveformWidgetFactory->isOpenGlShaderAvailable()) {
if (pWaveformWidgetFactory->isOpenGlShaderAvailable() &&
!CmdlineArgs::Instance().getUseLegacySpinny()) {
pSpinny = new WSpinnyGLSL(m_pParent, group, m_pConfig, m_pVCManager, pPlayer);
} else
#endif
Expand Down
8 changes: 8 additions & 0 deletions src/util/cmdlineargs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ CmdlineArgs::CmdlineArgs()
m_developer(false),
m_safeMode(false),
m_useVuMeterGL(false),
m_useLegacySpinny(false),
m_debugAssertBreak(false),
m_settingsPathSet(false),
m_scaleFactor(1.0),
Expand Down Expand Up @@ -178,6 +179,12 @@ bool CmdlineArgs::parse(const QStringList& arguments, CmdlineArgs::ParseMode mod
: QString());
parser.addOption(enableVuMeterGL);

const QCommandLineOption enableLegacySpinny(QStringLiteral("enable-legacy-spinny"),
forUserFeedback ? QCoreApplication::translate("CmdlineArgs",
"Use legacy spinny")
: QString());
parser.addOption(enableLegacySpinny);

const QCommandLineOption controllerDebug(QStringLiteral("controller-debug"),
forUserFeedback ? QCoreApplication::translate("CmdlineArgs",
"Causes Mixxx to display/log all of the controller data it "
Expand Down Expand Up @@ -339,6 +346,7 @@ bool CmdlineArgs::parse(const QStringList& arguments, CmdlineArgs::ParseMode mod
}

m_useVuMeterGL = parser.isSet(enableVuMeterGL);
m_useLegacySpinny = parser.isSet(enableLegacySpinny);
m_controllerDebug = parser.isSet(controllerDebug) || parser.isSet(controllerDebugDeprecated);
m_controllerAbortOnWarning = parser.isSet(controllerAbortOnWarning);
m_developer = parser.isSet(developer);
Expand Down
4 changes: 4 additions & 0 deletions src/util/cmdlineargs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class CmdlineArgs final {
bool getUseVuMeterGL() const {
return m_useVuMeterGL;
}
bool getUseLegacySpinny() const {
return m_useLegacySpinny;
}
bool getDebugAssertBreak() const { return m_debugAssertBreak; }
bool getSettingsPathSet() const { return m_settingsPathSet; }
mixxx::LogLevel getLogLevel() const { return m_logLevel; }
Expand Down Expand Up @@ -80,6 +83,7 @@ class CmdlineArgs final {
bool m_developer; // Developer Mode
bool m_safeMode;
bool m_useVuMeterGL;
bool m_useLegacySpinny;
bool m_debugAssertBreak;
bool m_settingsPathSet; // has --settingsPath been set on command line ?
double m_scaleFactor;
Expand Down

0 comments on commit ee90380

Please sign in to comment.