| 57 | } |
| 58 | |
| 59 | void FileDownloader::download_failed(emscripten_fetch_t *fetch) { |
| 60 | DownloadData* downData = static_cast<DownloadData*>(fetch->userData); |
| 61 | downData->status = DownloadData::Status::FAILURE; |
| 62 | std::erase_if(currentDownloads, [fetch](DownloadHandler& d) { |
| 63 | return (DownloadData*)fetch->userData == d.data.get(); |
| 64 | }); |
| 65 | emscripten_fetch_close(fetch); |
| 66 | } |
| 67 | |
| 68 | void FileDownloader::init() { |
| 69 | } |