| 1957 | } |
| 1958 | |
| 1959 | void GameEventHandler::CheckUpdates() |
| 1960 | { |
| 1961 | #if !defined(DEATH_DEBUG) |
| 1962 | ZoneScopedC(0x888888); |
| 1963 | |
| 1964 | String url = "https://deat.tk/downloads/games/jazz2/updates?v=" NCINE_VERSION "&d=" + PreferencesCache::GetDeviceID(); |
| 1965 | auto request = WebSession::GetDefault().CreateRequest(url); |
| 1966 | auto result = request.Execute(); |
| 1967 | if (result) { |
| 1968 | auto s = request.GetResponse().AsString(); |
| 1969 | constexpr std::uint64_t currentVersion = parseVersion(NCINE_VERSION_s); |
| 1970 | std::uint64_t latestVersion = parseVersion(s); |
| 1971 | if (currentVersion < latestVersion) { |
| 1972 | _newestVersion = s; |
| 1973 | } |
| 1974 | } else { |
| 1975 | LOGW("Failed to check for updates: {}", result.error); |
| 1976 | } |
| 1977 | #endif |
| 1978 | } |
| 1979 | #endif |
| 1980 | |
| 1981 | bool GameEventHandler::SetLevelHandler(const LevelInitialization& levelInit) |
no test coverage detected