Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复不同刷新率下导致的滚动行为异常问题,尝试修复了异常闪退 #646

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xiaojundebug
Copy link

@xiaojundebug xiaojundebug commented Apr 29, 2024

原本的滚动逻辑会因为显示器刷新率不同而导致滚动行为快慢不一致,本次更新重写了部分滚动逻辑,每次通过时间戳判断下次要滚动的距离。该改动会导致滚动手感与原本不一致,另外隐藏配置中的 precision 没有再使用。

滚动时长计算方式为:滚动时长随滚动距离长短在 300ms 基础上非线形增长,待滚动距离达到 10000px 时滚动时长达到最大。配置中的滚动时长配置代表着最大滚动时长,分别为 300,800, 1300, 1800, 2300

另外尝试修复了线程崩溃,有可能是 CVDisplayLink 启动的子线程与主线程协作出现了问题,现在改为每次滚轮时都重启 CVDisplayLink,测试后两天内已经没出现过线程奔溃问题

@xiaojundebug xiaojundebug changed the title 修复不同刷新率下导致的滚动行为异常问题,catch 部分错误防止程序崩溃 修复不同刷新率下导致的滚动行为异常问题 May 13, 2024
@xiaojundebug xiaojundebug changed the title 修复不同刷新率下导致的滚动行为异常问题 修复不同刷新率下导致的滚动行为异常问题,尝试修复了异常闪退 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant