From 1d1fa8108bf756e4551b05f6ded1af800b181664 Mon Sep 17 00:00:00 2001 From: wyyadd Date: Mon, 30 Sep 2024 14:54:36 -0700 Subject: [PATCH] feat: update game path exception --- lib/util/game_launcher.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/util/game_launcher.dart b/lib/util/game_launcher.dart index d243ea2..bdcdd53 100644 --- a/lib/util/game_launcher.dart +++ b/lib/util/game_launcher.dart @@ -58,6 +58,10 @@ Future _launchGame(BuildContext context, String trainerPath, int appId, Vo } } else { gamePath = '$steamPath/steamapps/compatdata/$nonSteamGameId'; + if (!await dirExist(gamePath)) { + if (!context.mounted) return; + throw Exception(AppLocalizations.of(context)!.gamePathNotFound(gamePath)); + } } }