More controller-connection stuff

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1024 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-05-26 08:12:35 +00:00
parent 79905590da
commit f2d2420fc7
4 changed files with 31 additions and 24 deletions

View File

@@ -130,12 +130,24 @@ void controller::resetFrameCounter( void )
controller * controller::create( ControllerTypes _ct, model * _parent )
{
static controller * dummy = NULL;
controller * c = NULL;
switch( _ct )
{
case LfoController: c = new lfoController( _parent ); break;
default: break;
case DummyController:
if( dummy )
c = dummy;
else
c = new controller( DummyController, NULL );
break;
case LfoController:
c = new lfoController( _parent );
break;
default:
break;
}
return( c );