diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-12-12 17:06:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 17:06:37 +0100 |
commit | 15bebf1695246c85852835b0fae58d795626dc39 (patch) | |
tree | 03de654621e65cb185b2a2e3511f71b933b005ef /src/yuzu/play_time_manager.h | |
parent | Merge pull request #12333 from german77/aruid_free (diff) | |
parent | core: Use single instance of profile manager (diff) | |
download | yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar.gz yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar.bz2 yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar.lz yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar.xz yuzu-15bebf1695246c85852835b0fae58d795626dc39.tar.zst yuzu-15bebf1695246c85852835b0fae58d795626dc39.zip |
Diffstat (limited to 'src/yuzu/play_time_manager.h')
-rw-r--r-- | src/yuzu/play_time_manager.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/yuzu/play_time_manager.h b/src/yuzu/play_time_manager.h index 5f96f3447..1714b9131 100644 --- a/src/yuzu/play_time_manager.h +++ b/src/yuzu/play_time_manager.h @@ -11,6 +11,10 @@ #include "common/common_types.h" #include "common/polyfill_thread.h" +namespace Service::Account { +class ProfileManager; +} + namespace PlayTime { using ProgramId = u64; @@ -19,7 +23,7 @@ using PlayTimeDatabase = std::map<ProgramId, PlayTime>; class PlayTimeManager { public: - explicit PlayTimeManager(); + explicit PlayTimeManager(Service::Account::ProfileManager& profile_manager); ~PlayTimeManager(); YUZU_NON_COPYABLE(PlayTimeManager); @@ -32,11 +36,13 @@ public: void Stop(); private: + void AutoTimestamp(std::stop_token stop_token); + void Save(); + PlayTimeDatabase database; u64 running_program_id; std::jthread play_time_thread; - void AutoTimestamp(std::stop_token stop_token); - void Save(); + Service::Account::ProfileManager& manager; }; QString ReadablePlayTime(qulonglong time_seconds); |