mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-04 21:55:42 +00:00
Check active preset after the preset switch event, as this might have failed.
Another option would be skipping the rendering if there's no active preset instead of displaying the idle preset.
This commit is contained in:
committed by
Kai Blaschke
parent
e9438ee0f6
commit
b07163dd51
@ -138,18 +138,6 @@ void ProjectM::RenderFrame()
|
||||
return;
|
||||
}
|
||||
|
||||
// If no preset is active, load the idle preset.
|
||||
if (!m_activePreset)
|
||||
{
|
||||
LoadIdlePreset();
|
||||
if (!m_activePreset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_activePreset->Initialize(GetRenderContext());
|
||||
}
|
||||
|
||||
m_timeKeeper->UpdateTimers();
|
||||
m_beatDetect->CalculateBeatStatistics();
|
||||
|
||||
@ -176,6 +164,18 @@ void ProjectM::RenderFrame()
|
||||
}
|
||||
}
|
||||
|
||||
// If no preset is active, load the idle preset.
|
||||
if (!m_activePreset)
|
||||
{
|
||||
LoadIdlePreset();
|
||||
if (!m_activePreset)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_activePreset->Initialize(GetRenderContext());
|
||||
}
|
||||
|
||||
// ToDo: Encapsulate preset loading check and transition in Renderer?
|
||||
if (m_timeKeeper->IsSmoothing() && m_transitioningPreset != nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user