| 89 | } |
| 90 | |
| 91 | static bool casc_progress_callback(void *PtrUserParam, LPCSTR szWork, LPCSTR szObject, DWORD CurrentValue, DWORD TotalValue) { |
| 92 | if (szObject) { |
| 93 | if (TotalValue) { |
| 94 | Common::Log::trace("CASC progress: {0} ({1}), {2}/{3}", szWork, szObject, CurrentValue, TotalValue); |
| 95 | } else { |
| 96 | Common::Log::trace("CASC progress: {0} ({1})", szWork, szObject); |
| 97 | } |
| 98 | } else { |
| 99 | if (TotalValue) { |
| 100 | Common::Log::trace("CASC progress: {0}, {1}/{2}", szWork, CurrentValue, TotalValue); |
| 101 | } else { |
| 102 | Common::Log::trace("CASC progress: {0}", szWork); |
| 103 | } |
| 104 | } |
| 105 | return false; |
| 106 | } |
| 107 | |
| 108 | CASC::CASC(const std::filesystem::path &cascPath) { |
| 109 | const std::string path = std::filesystem::absolute(cascPath).string(); |