Skip to content

Commit

Permalink
moved ifdef as suggested by @JoergAtGithub
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB committed Jul 16, 2023
1 parent a3f910b commit 6141e85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/widget/wspinny.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ void WSpinny::draw() {
p.drawImage(rect(), *m_pMaskImage, m_pMaskImage->rect());
}

#ifdef __VINYLCONTROL__
// Overlay the signal quality drawing if vinyl is active
if (shouldDrawVinylQuality()) {
// draw the last good image
p.drawImage(this->rect(), m_qImage);
}
#endif

// To rotate the foreground image around the center of the image,
// we use the classic trick of translating the coordinate system such that
Expand Down
4 changes: 4 additions & 0 deletions src/widget/wspinnybase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ WSpinnyBase::~WSpinnyBase() {
}

bool WSpinnyBase::shouldDrawVinylQuality() const {
#ifdef __VINYLCONTROL__
return m_bVinylActive && m_bSignalActive && m_bDrawVinylSignalQuality;
#else
return false;
#endif
}

void WSpinnyBase::onVinylSignalQualityUpdate(const VinylSignalQualityReport& report) {
Expand Down
2 changes: 0 additions & 2 deletions src/widget/wspinnyglsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,12 @@ void WSpinnyGLSL::paintGL() {
drawTexture(m_pMaskTexture.get());
}

#ifdef __VINYLCONTROL__
// Overlay the signal quality drawing if vinyl is active
if (shouldDrawVinylQuality()) {
m_textureShader.release();
drawVinylQuality();
m_textureShader.bind();
}
#endif

// To rotate the foreground image around the center of the image,
// we use the classic trick of translating the coordinate system such that
Expand Down

0 comments on commit 6141e85

Please sign in to comment.