Allow skipping intro videos with Escape/Gamepad Start

This commit is contained in:
Robert Beckebans 2024-06-29 12:54:29 +02:00
parent c3ecc7b808
commit 8389318e26
2 changed files with 29 additions and 1 deletions

View file

@ -330,6 +330,34 @@ bool idMenuHandler_Shell::HandleGuiEvent( const sysEvent_t* sev )
if( showingIntro )
{
// RB: allow to skip intro videos
if( sev->evType == SE_KEY && sev->evValue2 == 1 && ( sev->evValue == K_ESCAPE || sev->evValue == K_JOY9 ) )
{
if( introGui != NULL && introGui->IsActive() )
{
gui->StopSound();
showingIntro = false;
introGui->Activate( false );
PlaySound( GUI_SOUND_MUSIC );
const char* introName = introGui->GetName();
if( idStr::Cmp( introName, "swf/roeintro.swf" ) == 0 )
{
StartGame( 1 );
}
else if( idStr::Cmp( introName, "swf/leintro.swf" ) == 0 )
{
StartGame( 2 );
}
else
{
StartGame( 0 );
}
}
}
// RB end
return true;
}

View file

@ -1794,7 +1794,7 @@ bool idCommonLocal::ProcessEvent( const sysEvent_t* event )
{
if( event->evType == SE_KEY && event->evValue2 == 1 && ( event->evValue == K_ESCAPE || event->evValue == K_JOY9 ) )
{
if( game->CheckInCinematic() == true )
if( game->CheckInCinematic() )
{
game->SkipCinematicScene();
}