MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / FindInDBGameManager

Method FindInDBGameManager

src/render_panel/gr_run_game_manager.cpp:167–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 2

GetGameByGameIdMethod · 0.80
GetGameByExePathMethod · 0.80

Tested by

no test coverage detected