consolidate "delayed back" logic

This commit is contained in:
Glenn Maynard
2006-09-14 07:55:34 +00:00
parent 6e8d262f8f
commit 3157bb77d4
+3 -9
View File
@@ -162,8 +162,9 @@ void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRS
void Screen::MenuBack( const InputEventPlus &input )
{
if(!PREFSMAN->m_bDelayedBack || input.type==IET_REPEAT )
MenuBack( input.pn) ;
/* 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 );
}
void Screen::MenuCoin( const InputEventPlus &input ) { if(input.type==IET_FIRST_PRESS) MenuCoin(input.pn); }
@@ -189,13 +190,6 @@ void Screen::Input( const InputEventPlus &input )
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
if( !input.MenuI.IsValid() )
return;