Don't CancelAll downloads on StoreScreen close

This commit is contained in:
Henrik Rydgård
2026-06-13 15:13:29 +02:00
parent 3cec5a3974
commit a722139bd9
3 changed files with 19 additions and 13 deletions
+13 -11
View File
@@ -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 &params) {
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();
-1
View File
@@ -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
View File
@@ -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