Skip to content

Commit

Permalink
Update to new filter API
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Sep 28, 2024
1 parent bc52993 commit abcadfe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,13 @@ bool ConsolePlayer::createSidEmu (SIDEMUS emu, const SidTuneInfo *tuneInfo)

if (m_engCfg.sidEmulation) {
/* set up SID filter. HardSID just ignores call with def. */
m_engCfg.sidEmulation->filter(m_filter.enabled);
#ifdef FEAT_FILTER_DISABLE
m_engine.filter(0, m_filter.enabled);
m_engine.filter(1, m_filter.enabled);
m_engine.filter(2, m_filter.enabled);
#else
m_engCfg.sidEmulation->filter(m_filter.enabled);
#endif
}

return true;
Expand Down Expand Up @@ -1213,7 +1219,13 @@ void ConsolePlayer::decodeKeys ()
#endif
case A_TOGGLE_FILTER:
m_filter.enabled = !m_filter.enabled;
#ifdef FEAT_FILTER_DISABLE
m_engine.filter(0, m_filter.enabled);
m_engine.filter(1, m_filter.enabled);
m_engine.filter(2, m_filter.enabled);
#else
m_engCfg.sidEmulation->filter(m_filter.enabled);
#endif
break;

case A_QUIT:
Expand Down
1 change: 1 addition & 0 deletions src/sidlib_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#if LIBSIDPLAYFP_VERSION_MAJ > 2 || (LIBSIDPLAYFP_VERSION_MAJ == 2 && LIBSIDPLAYFP_VERSION_MIN >= 10)
# define FEAT_SAMPLE_MUTE
# define FEAT_FILTER_DISABLE
#endif

#endif

0 comments on commit abcadfe

Please sign in to comment.