mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-12 14:00:27 +02:00
HTTP: Replace ProgressBarMode with a new RequestFlags enum
This commit is contained in:
1 parent
5c0553031e
commit
eb719c43e8
14 files changed
+53
-56
No files matched your search
+3
-3
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
if (useIconCache && g_iconCache.MarkPending(path_)) {
|
||||
const char *acceptMime = "image/png, image/jpeg, image/*; q=0.9, */*; q=0.8";
|
||||
requestManager_->StartDownloadWithCallback(path_, Path(), http::ProgressBarMode::DELAYED, [](http::Request &download) {
|
||||
requestManager_->StartDownloadWithCallback(path_, Path(), http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed, [](http::Request &download) {
|
||||
// Can't touch 'this' in this function! Don't use captures!
|
||||
std::string path = download.url();
|
||||
if (download.ResultCode() == 200) {
|
||||
@@ -179,7 +179,7 @@ void HttpImageFileView::Draw(UIContext &dc) {
|
||||
if (!texture_ && !textureFailed_ && !path_.empty() && !download_) {
|
||||
auto cb = std::bind(&HttpImageFileView::DownloadCompletedCallback, this, std::placeholders::_1);
|
||||
const char *acceptMime = "image/png, image/jpeg, image/*; q=0.9, */*; q=0.8";
|
||||
requestManager_->StartDownloadWithCallback(path_, Path(), http::ProgressBarMode::NONE, cb, acceptMime);
|
||||
requestManager_->StartDownloadWithCallback(path_, Path(), http::RequestFlags::Default, cb, acceptMime);
|
||||
}
|
||||
|
||||
if (!textureData_.empty()) {
|
||||
@@ -433,7 +433,7 @@ StoreScreen::StoreScreen() {
|
||||
|
||||
std::string indexPath = StoreBaseUrl() + "index.json";
|
||||
const char *acceptMime = "application/json, */*; q=0.8";
|
||||
listing_ = g_DownloadManager.StartDownload(indexPath, Path(), http::ProgressBarMode::DELAYED, acceptMime);
|
||||
listing_ = g_DownloadManager.StartDownload(indexPath, Path(), http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed, acceptMime);
|
||||
}
|
||||
|
||||
StoreScreen::~StoreScreen() {
|
||||
|
||||
Reference in new issue
Block a user