consolidate "delayed back" logic
This commit is contained in:
@@ -162,7 +162,8 @@ void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRS
|
|||||||
|
|
||||||
void Screen::MenuBack( const InputEventPlus &input )
|
void Screen::MenuBack( const InputEventPlus &input )
|
||||||
{
|
{
|
||||||
if(!PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT )
|
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
||||||
|
if( !PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT || (input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC) )
|
||||||
MenuBack( input.pn );
|
MenuBack( input.pn );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,13 +190,6 @@ void Screen::Input( const InputEventPlus &input )
|
|||||||
return; // don't care
|
return; // don't care
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't make the user hold the back button if they're pressing escape and escape is the back button. */
|
|
||||||
if( input.MenuI == MENU_BUTTON_BACK && input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_ESC )
|
|
||||||
{
|
|
||||||
this->MenuBack( input.pn );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// default input handler used by most menus
|
// default input handler used by most menus
|
||||||
if( !input.MenuI.IsValid() )
|
if( !input.MenuI.IsValid() )
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user