@@ -805,6 +805,40 @@ void RetroFE::run( )
805805 }
806806 break ;
807807
808+ // Launching bibi; start onGameEnter animation
809+ case RETROFE_LAUNCH_BIBI_ENTER:
810+ currentPage_->enterGame ( ); // Start onGameEnter animation
811+ currentPage_->playSelect ( ); // Play launch sound
812+ state = RETROFE_LAUNCH_BIBI_REQUEST;
813+ break ;
814+
815+ // Wait for onGameEnter animation to finish; launch ; start onGameExit animation
816+ case RETROFE_LAUNCH_BIBI_REQUEST:
817+ if ( currentPage_->isIdle ( ) && !currentPage_->isSelectPlaying ( ) )
818+ {
819+ launchEnter ( );
820+ printf (" BIBI !!!!\n " );
821+
822+ /* Restart audio amp */
823+ system (SHELL_CMD_AUDIO_AMP_ON);
824+
825+ /* Execute game */
826+ if (system (BIBI_CMD) < 0 )
827+ {
828+ Logger::write (Logger::ZONE_ERROR, " Launcher" , " Failed to launch bibi with cmd: \" " + std::string (BIBI_CMD) +" \" " );
829+ }
830+
831+ /* Stop audio amp */
832+ system (SHELL_CMD_AUDIO_AMP_OFF);
833+
834+ /* Exit animation */
835+ launchExit ( );
836+ currentPage_->exitGame ( );
837+
838+ state = RETROFE_LAUNCH_EXIT;
839+ }
840+ break ;
841+
808842 // Wait for onGameExit animation to finish
809843 case RETROFE_LAUNCH_EXIT:
810844 if ( currentPage_->isIdle ( ) )
@@ -1155,7 +1189,17 @@ RetroFE::RETROFE_STATE RetroFE::processUserInput( Page *page )
11551189 }
11561190#endif
11571191
1158-
1192+ // ,-* ,-* ,-*
1193+ // (_) (_) (_)
1194+ #define KONAMI_CODE_SIZE 10
1195+ static const int konami_code_sdl[KONAMI_CODE_SIZE]={SDLK_u,SDLK_u,SDLK_d,SDLK_d,SDLK_l,SDLK_l,SDLK_r,SDLK_r,SDLK_b,SDLK_a};
1196+ static uint8_t idx_konami_code = 0 ;
1197+ if (e.type ==SDL_KEYDOWN && e.key .keysym .sym != konami_code_sdl[idx_konami_code]) idx_konami_code=0 ;
1198+ if (e.type ==SDL_KEYDOWN && e.key .keysym .sym == konami_code_sdl[idx_konami_code]) idx_konami_code++;
1199+ if (idx_konami_code >= KONAMI_CODE_SIZE){
1200+ idx_konami_code = 0 ;
1201+ return RETROFE_LAUNCH_BIBI_ENTER;
1202+ }
11591203
11601204 // Handle next/previous game inputs
11611205 if ( page->isHorizontalScroll ( ) )
0 commit comments