| 165 | } |
| 166 | |
| 167 | std::shared_ptr<TcDBGame> GrRunGameManager::FindInDBGameManager(const std::string& game_path) { |
| 168 | if (SteamManager::IsSteamPath(game_path)) { |
| 169 | // find by steam id |
| 170 | auto app_id_str = SteamManager::ParseSteamIdFromPath(game_path); |
| 171 | auto app_id = std::atoi(app_id_str.c_str()); |
| 172 | if (app_id == 0) { |
| 173 | LOGE("Parse steam id failed: {}", app_id_str); |
| 174 | return nullptr; |
| 175 | } |
| 176 | return this->db_game_manager_->GetGameByGameId(app_id); |
| 177 | } else { |
| 178 | // find by path |
| 179 | return this->db_game_manager_->GetGameByExePath(game_path); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void GrRunGameManager::CheckRunningGame() { |
| 184 | auto beg = TimeUtil::GetCurrentTimestamp(); |
nothing calls this directly
no test coverage detected