mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Don't CancelAll downloads on StoreScreen close
This commit is contained in:
+13
-11
@@ -557,7 +557,12 @@ bool ShaderViewScreen::key(const KeyInput &ki) {
|
||||
const std::string framedumpsBaseUrl = "http://framedump.ppsspp.org/repro/";
|
||||
|
||||
FrameDumpTestScreen::~FrameDumpTestScreen() {
|
||||
g_DownloadManager.CancelAll();
|
||||
if (listing_) {
|
||||
listing_->Cancel();
|
||||
}
|
||||
if (dumpDownload_) {
|
||||
dumpDownload_->Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void FrameDumpTestScreen::CreateTabs() {
|
||||
@@ -573,22 +578,19 @@ void FrameDumpTestScreen::CreateTabs() {
|
||||
std::string url = framedumpsBaseUrl + file;
|
||||
Choice *c = parent->Add(new Choice(file));
|
||||
c->SetTag(url);
|
||||
c->OnClick.Handle<FrameDumpTestScreen>(this, &FrameDumpTestScreen::OnLoadDump);
|
||||
c->OnClick.Add([this, url = Path(url)](UI::EventParams &e) {
|
||||
INFO_LOG(Log::Common, "Trying to launch '%s'", url.c_str());
|
||||
// Our disc streaming functionality detects the URL and takes over and handles loading framedumps well,
|
||||
// except for some reason the game ID.
|
||||
// TODO: Fix that since it can be important for compat settings.
|
||||
screenManager()->switchScreen(new EmuScreen(url));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
EnsureTabs();
|
||||
}
|
||||
|
||||
void FrameDumpTestScreen::OnLoadDump(UI::EventParams ¶ms) {
|
||||
Path url = Path(params.v->Tag());
|
||||
INFO_LOG(Log::Common, "Trying to launch '%s'", url.c_str());
|
||||
// Our disc streaming functionality detects the URL and takes over and handles loading framedumps well,
|
||||
// except for some reason the game ID.
|
||||
// TODO: Fix that since it can be important for compat settings.
|
||||
screenManager()->switchScreen(new EmuScreen(url));
|
||||
}
|
||||
|
||||
void FrameDumpTestScreen::update() {
|
||||
UIScreen::update();
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@ public:
|
||||
const char *tag() const override { return "FrameDumpTest"; }
|
||||
|
||||
private:
|
||||
void OnLoadDump(UI::EventParams &e);
|
||||
bool ShowSearchControls() const override { return false; }
|
||||
|
||||
std::vector<std::string> files_;
|
||||
|
||||
+6
-1
@@ -426,7 +426,12 @@ StoreScreen::StoreScreen() : UISimpleBaseDialogScreen(Path(), SimpleDialogFlags:
|
||||
}
|
||||
|
||||
StoreScreen::~StoreScreen() {
|
||||
g_DownloadManager.CancelAll();
|
||||
if (listing_) {
|
||||
listing_->Cancel();
|
||||
}
|
||||
if (image_) {
|
||||
image_->Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle async download tasks
|
||||
|
||||
Reference in New Issue
Block a user