diff --git a/src/duckstation-qt/gamelistrefreshthread.cpp b/src/duckstation-qt/gamelistrefreshthread.cpp index 712712042..c51f18a91 100644 --- a/src/duckstation-qt/gamelistrefreshthread.cpp +++ b/src/duckstation-qt/gamelistrefreshthread.cpp @@ -22,6 +22,23 @@ void AsyncRefreshProgressCallback::Cancel() m_cancelled = true; } +void AsyncRefreshProgressCallback::PushState() +{ + ProgressCallback::PushState(); +} + +void AsyncRefreshProgressCallback::PopState() +{ + ProgressCallback::PopState(); + + if (static_cast(m_progress_range) == m_last_range && static_cast(m_progress_value) == m_last_value) + return; + + m_last_range = static_cast(m_progress_range); + m_last_value = static_cast(m_progress_value); + fireUpdate(); +} + void AsyncRefreshProgressCallback::SetStatusText(const std::string_view text) { const QString new_text = QtUtils::StringViewToQString(text); diff --git a/src/duckstation-qt/gamelistrefreshthread.h b/src/duckstation-qt/gamelistrefreshthread.h index 647281209..9c0e736f9 100644 --- a/src/duckstation-qt/gamelistrefreshthread.h +++ b/src/duckstation-qt/gamelistrefreshthread.h @@ -18,6 +18,9 @@ public: void Cancel(); + void PushState() override; + void PopState() override; + void SetStatusText(const std::string_view text) override; void SetProgressRange(u32 range) override; void SetProgressValue(u32 value) override;