diff options
author | 2011-04-14 20:50:40 +0200 | |
---|---|---|
committer | 2011-04-14 20:50:40 +0200 | |
commit | 4e3bdbb0bc8649208400b9eb63751db15bc9bcda (patch) | |
tree | 3bfc597a6255a652ce774558bda4bf65c6b6252a /plugins/sid/csid.cpp | |
parent | a0116d4496107e368b791d86295834c6e844a6e8 (diff) |
new event passing system
Diffstat (limited to 'plugins/sid/csid.cpp')
-rw-r--r-- | plugins/sid/csid.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/sid/csid.cpp b/plugins/sid/csid.cpp index ffdd4548..20293812 100644 --- a/plugins/sid/csid.cpp +++ b/plugins/sid/csid.cpp @@ -605,7 +605,7 @@ csid_mutevoice (DB_fileinfo_t *_info, int voice, int mute) { #endif static int -csid_on_configchanged (DB_event_t *ev, uintptr_t data) { +sid_configchanged (void) { int conf_hvsc_enable = deadbeef->conf_get_int ("hvsc_enable", 0); int disable = !conf_hvsc_enable; if (disable != sldb_disable) { @@ -623,14 +623,22 @@ csid_on_configchanged (DB_event_t *ev, uintptr_t data) { } int +sid_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { + switch (id) { + case DB_EV_CONFIGCHANGED: + sid_configchanged (); + break; + } + return 0; +} + +int csid_start (void) { - deadbeef->ev_subscribe (DB_PLUGIN (&sid_plugin), DB_EV_CONFIGCHANGED, DB_CALLBACK (csid_on_configchanged), 0); return 0; } int csid_stop (void) { - deadbeef->ev_unsubscribe (DB_PLUGIN (&sid_plugin), DB_EV_CONFIGCHANGED, DB_CALLBACK (csid_on_configchanged), 0); if (sldb) { free (sldb); sldb = NULL; |