From bc38d696bc11ec882e94f1c6e7944ad272af6ab0 Mon Sep 17 00:00:00 2001 From: Troy <49777269+TroyKomodo@users.noreply.github.com> Date: Sat, 3 Sep 2022 23:20:30 -0400 Subject: [PATCH] Reduce GIF frame window from 30ms to 20ms (#3907) --- CHANGELOG.md | 1 + src/singletons/helper/GifTimer.cpp | 3 ++- src/singletons/helper/GifTimer.hpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aab1fd16..52b87d295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Minor: Added `/copy` command. Usage: `/copy `. Copies provided text to clipboard - can be useful with custom commands. (#3763) - Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792) - Minor: Add Quick Switcher item to open a channel in a new popup window. (#3828) +- Minor: Reduced GIF frame window from 30ms to 20ms, causing fewer frame skips in animated emotes. (#3886, #3907) - Minor: Warn when parsing an environment variable fails. (#3904) - Minor: Load missing messages from Recent Messages API upon reconnecting (#3878, #3932) - Minor: Add settings to toggle BTTV/FFZ global/channel emotes (#3935) diff --git a/src/singletons/helper/GifTimer.cpp b/src/singletons/helper/GifTimer.cpp index 2edf7bacd..c1ad6b734 100644 --- a/src/singletons/helper/GifTimer.cpp +++ b/src/singletons/helper/GifTimer.cpp @@ -8,7 +8,8 @@ namespace chatterino { void GIFTimer::initialize() { - this->timer.setInterval(30); + this->timer.setInterval(gifFrameLength); + this->timer.setTimerType(Qt::PreciseTimer); getSettings()->animateEmotes.connect([this](bool enabled, auto) { if (enabled) diff --git a/src/singletons/helper/GifTimer.hpp b/src/singletons/helper/GifTimer.hpp index da47149b8..d20d933bc 100644 --- a/src/singletons/helper/GifTimer.hpp +++ b/src/singletons/helper/GifTimer.hpp @@ -5,7 +5,7 @@ namespace chatterino { -constexpr long unsigned gifFrameLength = 33; +constexpr long unsigned gifFrameLength = 20; class GIFTimer {