mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-25 16:55:08 +00:00
Fix: Only fire switched event if preset load succeeded
This commit is contained in:
committed by
Mischa Spiegelmock
parent
be07112ae7
commit
aa24265fd1
@ -131,8 +131,9 @@ void PlaylistCWrapper::PlayPresetIndex(uint32_t index, bool hardCut, bool resetF
|
||||
{
|
||||
if (m_presetLoadEventCallback(index, filename.c_str(), hardCut, m_presetLoadEventUserData))
|
||||
{
|
||||
// Application handled the load, don't try to load from filesystem
|
||||
if (m_presetSwitchedEventCallback != nullptr)
|
||||
// Application handled the load, don't try to load from filesystem.
|
||||
// Only fire switched event if the app's load succeeded.
|
||||
if (!m_lastPresetSwitchFailed && m_presetSwitchedEventCallback != nullptr)
|
||||
{
|
||||
m_presetSwitchedEventCallback(hardCut, index, m_presetSwitchedEventUserData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user