aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-02-14 15:35:03 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-02-15 18:44:07 +0800
commitc7bf3e37e6eaed6895c797f72ef116b42c6f8a44 (patch)
treef617e55b763fca98630c34ebb1988d56ab374d51
parent59b0a4f74fd358d44c65137e41594fc7dc8a106e (diff)
downloadQMidiPlayer-visualization-renovation.tar.xz
3D Visualization with 2D notes no longer causes crashes.visualization-renovation
-rw-r--r--visualization/qmpvisualization.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp
index 5ada18f..8ec447b 100644
--- a/visualization/qmpvisualization.cpp
+++ b/visualization/qmpvisualization.cpp
@@ -108,7 +108,7 @@ void qmpVisualization::showThread()
}else memset(pss,0,sizeof(pss));
if(showpiano&&!horizontal)for(int i=0;i<16;++i)p3d[i]=new qmpVirtualPiano3D();
memset(traveld,0,sizeof(traveld));
- if(noteappearance==1)nebuf=new smEntity3DBuffer();else nebuf=nullptr;
+ nebuf=new smEntity3DBuffer();
tdscn=sm->smTargetCreate(wwidth*wsupersample,wheight*wsupersample,wmultisample);
tdparticles=sm->smTargetCreate(wwidth*wsupersample,wheight*wsupersample,wmultisample);
if(!api->getOptionString("Visualization/font2").length()||!font.loadTTF(api->getOptionString("Visualization/font2").c_str(),fontsize))
@@ -167,7 +167,7 @@ void qmpVisualization::close()
if(showpiano&&!horizontal)for(int i=0;i<16;++i)delete p3d[i];
if(showparticle&&!horizontal)for(int i=0;i>16;++i)for(int j=0;j<128;++j){delete pss[i][j];pss[i][j]=0;}
- if(noteappearance==1)delete nebuf;
+ delete nebuf;
if(savevp)
{
api->setOptionDouble("Visualization/px",pos[0]);
@@ -356,7 +356,7 @@ void qmpVisualization::updateVisualization3D()
drawCube(a,b,SETA(iccolors[i],204),0);
}
}
- if(noteappearance)nebuf->drawBatch();
+ nebuf->drawBatch();
if(showpiano&&!horizontal)
for(int i=0;i<16;++i)
{