@@ -452,7 +452,7 @@ void start_game_from_home_with_inference(
452452
453453 pbf_press_button (context, BUTTON_A, 160ms, 840ms);
454454
455- while ( true ){
455+ for ( int c = 0 ; c < 20 ; c++ ){
456456 HomeMenuWatcher home (console, std::chrono::milliseconds (2000 ));
457457 StartGameUserSelectWatcher user_select (console, COLOR_GREEN);
458458 UpdateMenuWatcher update_menu (console, COLOR_PURPLE);
@@ -503,13 +503,16 @@ void start_game_from_home_with_inference(
503503 console.log (" Detected black screen. Game started..." );
504504 return ;
505505 default :
506- OperationFailedException::fire (
507- ErrorReport::SEND_ERROR_REPORT,
508- " start_game_from_home_with_inference(): No recognizable state after 30 seconds." ,
509- console
510- );
506+ console.log (" start_game_from_home_with_inference(): No recognizable state after 30 seconds." , COLOR_RED);
507+ pbf_press_button (context, BUTTON_HOME, 160ms, 840ms);
511508 }
512509 }
510+
511+ OperationFailedException::fire (
512+ ErrorReport::SEND_ERROR_REPORT,
513+ " start_game_from_home_with_inference(): Failed to start game after 20 actions." ,
514+ console
515+ );
513516}
514517void start_game_from_home_with_inference (
515518 ConsoleHandle& console, JoyconContext& context,
0 commit comments