From 13fca5100f1e28a538e7900d011714d94f6b1b10 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 28 Apr 2016 23:40:42 +0800 Subject: Now it is possible to disable plugins in the plugin list. --- visualization/qmpvisualization.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'visualization/qmpvisualization.cpp') diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 1e64b22..1a11334 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -238,13 +238,16 @@ void qmpVisualization::init() vi=new CDemoVisualization(this); h=new CMidiVisualHandler(this); closeh=new CloseHandler(this); - api->registerVisualizationIntf(vi); - api->registerEventReaderIntf(cb,NULL); - api->registerEventHandlerIntf(hcb,NULL); + hvif=api->registerVisualizationIntf(vi); + herif=api->registerEventReaderIntf(cb,NULL); + hehif=api->registerEventHandlerIntf(hcb,NULL); } void qmpVisualization::deinit() { close(); + api->unregisterVisualizationIntf(hvif); + api->unregisterEventReaderIntf(herif); + api->unregisterEventHandlerIntf(hehif); delete cb;delete hcb;delete vi; delete h;delete closeh; } -- cgit v1.2.3