| 145 | } |
| 146 | |
| 147 | std::shared_ptr<SteamApp> GrRunGameManager::FindInSteamManager(const std::string& game_path) { |
| 148 | if (!SteamManager::IsSteamPath(game_path)) { |
| 149 | LOGI("path: {} is not a steam url", game_path); |
| 150 | return nullptr; |
| 151 | } |
| 152 | |
| 153 | auto app_id = SteamManager::ParseSteamIdFromPath(game_path); |
| 154 | if (app_id.empty()) { |
| 155 | LOGE("Invalid steam url: {}", game_path); |
| 156 | return nullptr; |
| 157 | } |
| 158 | const auto& games = this->steam_mgr_->GetInstalledGames(); |
| 159 | for (auto& game : games) { |
| 160 | if (game->app_id_ == std::atoi(app_id.c_str())) { |
| 161 | return game; |
| 162 | } |
| 163 | } |
| 164 | return nullptr; |
| 165 | } |
| 166 | |
| 167 | std::shared_ptr<TcDBGame> GrRunGameManager::FindInDBGameManager(const std::string& game_path) { |
| 168 | if (SteamManager::IsSteamPath(game_path)) { |
nothing calls this directly
no test coverage detected