MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / onDownloadProgress

Method onDownloadProgress

pcsx2-qt/CoverDownloadDialog.cpp:44–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void CoverDownloadDialog::onDownloadProgress(int value, int range)
45{
46 // Limit to once every five seconds, otherwise it's way too flickery.
47 // Ideally in the future we'd have some way to invalidate only a single cover.
48 if (m_last_refresh_time.GetTimeSeconds() >= 5.0f)
49 {
50 emit coverRefreshRequested();
51 m_last_refresh_time.Reset();
52 }
53
54 if (range != m_ui.progress->maximum())
55 m_ui.progress->setMaximum(range);
56 m_ui.progress->setValue(value);
57}
58
59void CoverDownloadDialog::onDownloadComplete()
60{

Callers

nothing calls this directly

Calls 2

GetTimeSecondsMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected