Qt: Reduce game list jank after shutting down VM
Prevents progress bar briefly appearing, and the list scrolling to the top when you exit a game.
This commit is contained in:
@ -71,6 +71,8 @@ struct Entry
|
||||
ALWAYS_INLINE EntryType GetSortType() const { return (type == EntryType::DiscSet) ? EntryType::Disc : type; }
|
||||
};
|
||||
|
||||
using EntryList = std::vector<Entry>;
|
||||
|
||||
const char* GetEntryTypeName(EntryType type);
|
||||
const char* GetEntryTypeDisplayName(EntryType type);
|
||||
|
||||
@ -97,6 +99,10 @@ bool IsGameListLoaded();
|
||||
/// If only_cache is set, no new files will be scanned, only those present in the cache.
|
||||
void Refresh(bool invalidate_cache, bool only_cache = false, ProgressCallback* progress = nullptr);
|
||||
|
||||
/// Moves the current game list, which can be temporarily displayed in the UI until refresh completes.
|
||||
/// The caller **must** call Refresh() afterward, otherwise it will be permanently lost.
|
||||
EntryList TakeEntryList();
|
||||
|
||||
/// Add played time for the specified serial.
|
||||
void AddPlayedTimeForSerial(const std::string& serial, std::time_t last_time, std::time_t add_time);
|
||||
void ClearPlayedTimeForSerial(const std::string& serial);
|
||||
|
||||
Reference in New Issue
Block a user