From e0cd2d435aa64ab18018304311ab9eeb7affcdc3 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Thu, 5 Dec 2024 05:35:10 -0800 Subject: [PATCH] update settingsCache --- cockatrice/src/settings/cache_settings.cpp | 7 +++++++ cockatrice/src/settings/cache_settings.h | 6 ++++++ dbconverter/src/mocks.cpp | 3 +++ tests/carddatabase/mocks.cpp | 3 +++ 4 files changed, 19 insertions(+) diff --git a/cockatrice/src/settings/cache_settings.cpp b/cockatrice/src/settings/cache_settings.cpp index 3a75af782..25feef116 100644 --- a/cockatrice/src/settings/cache_settings.cpp +++ b/cockatrice/src/settings/cache_settings.cpp @@ -245,6 +245,7 @@ SettingsCache::SettingsCache() minPlayersForMultiColumnLayout = settings->value("interface/min_players_multicolumn", 4).toInt(); tapAnimation = settings->value("cards/tapanimation", true).toBool(); openDeckInNewTab = settings->value("editor/openDeckInNewTab", false).toBool(); + rewindBufferingMs = settings->value("replay/rewindBufferingMs", 200).toBool(); chatMention = settings->value("chat/mention", true).toBool(); chatMentionCompleter = settings->value("chat/mentioncompleter", true).toBool(); chatMentionForeground = settings->value("chat/mentionforeground", true).toBool(); @@ -545,6 +546,12 @@ void SettingsCache::setOpenDeckInNewTab(QT_STATE_CHANGED_T _openDeckInNewTab) settings->setValue("editor/openDeckInNewTab", openDeckInNewTab); } +void SettingsCache::setRewindBufferingMs(int _rewindBufferingMs) +{ + rewindBufferingMs = _rewindBufferingMs; + settings->setValue("replay/rewindBufferingMs", rewindBufferingMs); +} + void SettingsCache::setChatMention(QT_STATE_CHANGED_T _chatMention) { chatMention = static_cast(_chatMention); diff --git a/cockatrice/src/settings/cache_settings.h b/cockatrice/src/settings/cache_settings.h index 77e826412..1d4b9ecdd 100644 --- a/cockatrice/src/settings/cache_settings.h +++ b/cockatrice/src/settings/cache_settings.h @@ -103,6 +103,7 @@ private: int minPlayersForMultiColumnLayout; bool tapAnimation; bool openDeckInNewTab; + int rewindBufferingMs; bool chatMention; bool chatMentionCompleter; QString chatMentionColor; @@ -312,6 +313,10 @@ public: { return openDeckInNewTab; } + int getRewindBufferingMs() const + { + return rewindBufferingMs; + } bool getChatMention() const { return chatMention; @@ -566,6 +571,7 @@ public slots: void setMinPlayersForMultiColumnLayout(int _minPlayersForMultiColumnLayout); void setTapAnimation(QT_STATE_CHANGED_T _tapAnimation); void setOpenDeckInNewTab(QT_STATE_CHANGED_T _openDeckInNewTab); + void setRewindBufferingMs(int _rewindBufferingMs); void setChatMention(QT_STATE_CHANGED_T _chatMention); void setChatMentionCompleter(QT_STATE_CHANGED_T _chatMentionCompleter); void setChatMentionForeground(QT_STATE_CHANGED_T _chatMentionForeground); diff --git a/dbconverter/src/mocks.cpp b/dbconverter/src/mocks.cpp index e13db95ff..0de1efb35 100644 --- a/dbconverter/src/mocks.cpp +++ b/dbconverter/src/mocks.cpp @@ -166,6 +166,9 @@ void SettingsCache::setTapAnimation(QT_STATE_CHANGED_T /* _tapAnimation */) void SettingsCache::setOpenDeckInNewTab(QT_STATE_CHANGED_T /* _openDeckInNewTab */) { } +void SettingsCache::setRewindBufferingMs(int /* _rewindBufferingMs */) +{ +} void SettingsCache::setChatMention(QT_STATE_CHANGED_T /* _chatMention */) { } diff --git a/tests/carddatabase/mocks.cpp b/tests/carddatabase/mocks.cpp index 0eed998b3..c7c7b5976 100644 --- a/tests/carddatabase/mocks.cpp +++ b/tests/carddatabase/mocks.cpp @@ -170,6 +170,9 @@ void SettingsCache::setTapAnimation(QT_STATE_CHANGED_T /* _tapAnimation */) void SettingsCache::setOpenDeckInNewTab(QT_STATE_CHANGED_T /* _openDeckInNewTab */) { } +void SettingsCache::setRewindBufferingMs(int /* _rewindBufferingMs */) +{ +} void SettingsCache::setChatMention(QT_STATE_CHANGED_T /* _chatMention */) { }