support sequences of only one input
This commit is contained in:
@@ -116,7 +116,7 @@ bool CodeItem::Load( CString sButtonsNames )
|
|||||||
split( sButtonsNames, ",", asButtonNames, false );
|
split( sButtonsNames, ",", asButtonNames, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( asButtonNames.size() < 2 )
|
if( asButtonNames.size() < 1 )
|
||||||
{
|
{
|
||||||
if( sButtonsNames != "" )
|
if( sButtonsNames != "" )
|
||||||
LOG->Trace( "The code '%s' is less than 2 buttons, so it will be ignored.", sButtonsNames.c_str() );
|
LOG->Trace( "The code '%s' is less than 2 buttons, so it will be ignored.", sButtonsNames.c_str() );
|
||||||
@@ -142,7 +142,9 @@ bool CodeItem::Load( CString sButtonsNames )
|
|||||||
switch( m_Type )
|
switch( m_Type )
|
||||||
{
|
{
|
||||||
case sequence:
|
case sequence:
|
||||||
ASSERT( buttons.size() >= 2 )
|
if( buttons.size() == 1 )
|
||||||
|
fMaxSecondsBack = -1;
|
||||||
|
else
|
||||||
fMaxSecondsBack = (buttons.size()-1)*0.6f;
|
fMaxSecondsBack = (buttons.size()-1)*0.6f;
|
||||||
break;
|
break;
|
||||||
case hold_and_press:
|
case hold_and_press:
|
||||||
|
|||||||
Reference in New Issue
Block a user