mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-24 07:58:51 -04:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user