aboutsummaryrefslogtreecommitdiff
path: root/visualization
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-28 23:40:42 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-28 23:40:42 +0800
commit13fca5100f1e28a538e7900d011714d94f6b1b10 (patch)
tree2034d837473c14f600987134d98f51f0a5ab3c5d /visualization
parent8eac5088101595422753030b1b259411d63f83a8 (diff)
downloadQMidiPlayer-13fca5100f1e28a538e7900d011714d94f6b1b10.tar.xz
Now it is possible to disable plugins in the plugin list.
Diffstat (limited to 'visualization')
-rw-r--r--visualization/qmpvisualization.cpp9
-rw-r--r--visualization/qmpvisualization.hpp1
2 files changed, 7 insertions, 3 deletions
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;
}
diff --git a/visualization/qmpvisualization.hpp b/visualization/qmpvisualization.hpp
index afc57a4..787b218 100644
--- a/visualization/qmpvisualization.hpp
+++ b/visualization/qmpvisualization.hpp
@@ -53,6 +53,7 @@ class qmpVisualization:public qmpPluginIntf
uint32_t ctc,ctk,fintk,elb;
double etps;
bool shouldclose,playing;
+ int hvif,herif,hehif;
void drawCube(smvec3d a,smvec3d b,DWORD col,SMTEX tex);
void showThread();
public: