add wonky image loading

This commit is contained in:
ouwou committed 2020-09-30 00:12:38 -04:00
1 parent 1460d89140
commit 4ac27e9140
10 files changed
+239 -20

No files matched your search

+9
View File
@@ -51,6 +51,15 @@ void Cache::GetFileFromURL(std::string url, callback_type cb) {
}
}
std::string Cache::GetPathIfCached(std::string url) {
auto cache_path = m_tmp_path / SanitizeString(url);
if (std::filesystem::exists(cache_path)) {
return cache_path.string();
}
return "";
}
// this just seems really yucky
void Cache::CleanupFutures() {
for (auto it = m_futures.begin(); it != m_futures.end();) {