Improved responsiveness when refreshing game list.

This commit is contained in:
Christian Aguilera
2020-09-27 04:01:54 +02:00
parent 4ca92464c0
commit ee13e6ec80
9 changed files with 86 additions and 28 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <atomic>
#include <cstddef>
#include <functional>
#include <memory>
@ -44,9 +45,11 @@ public:
// These functions return true if the call modified the cache.
bool Update(const std::vector<std::string>& all_game_paths,
std::function<void(const std::shared_ptr<const GameFile>&)> game_added_to_cache = {},
std::function<void(const std::string&)> game_removed_from_cache = {});
std::function<void(const std::string&)> game_removed_from_cache = {},
const std::atomic_bool& processing_halted = false);
bool UpdateAdditionalMetadata(
std::function<void(const std::shared_ptr<const GameFile>&)> game_updated = {});
std::function<void(const std::shared_ptr<const GameFile>&)> game_updated = {},
const std::atomic_bool& processing_halted = false);
bool Load();
bool Save();