mirror of
https://github.com/PlayCover/PlayCover.git
synced 2026-04-26 08:15:56 +03:00
[GH-ISSUE #1022] [Bug]: Bug in "Zoom camera in and out with scroll" #536
Labels
No labels
UI
app-support
bug
bug
documentation
duplicate
enhancement
game-support
good first issue
help wanted / caution
inactive
invalid
macos-beta
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PlayCover#536
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JiuZ-Chn on GitHub (Jun 30, 2023).
Original GitHub issue: https://github.com/PlayCover/PlayCover/issues/1022
Is your feature request related to a problem?
I find that there's bug in this feature https://github.com/PlayCover/PlayTools/pull/73 for our beta version.
I try this in the game by this step:
Describe the solution you'd like
Want bug fix in the new feature. At least a switch button to disable it.
Maybe this feature works on some games, it helps some player.
Anything else?
No
Issue Language
@JiuZ-Chn commented on GitHub (Jun 30, 2023):
@XuYicong Could you please help on this?
@XuYicong commented on GitHub (Jun 30, 2023):
I suspect that the cause is the mouse poll rate too high, causing playcover sending too many touch events and crashing some critical game threads. But I am not sure if there are other causes.
@JiuZ-Chn commented on GitHub (Jun 30, 2023):
This issue occurs when I zoom in/out to the maximum, If I just zoom in/out a little, there's no bug on it.
@JiuZ-Chn commented on GitHub (Jul 15, 2023):
@XuYicong 这个视角问题可以通过禁用鼠标选项中的滚动时使用惯性来避免,或许是因为这个惯性的机制导致发了过多的信号给PlayCover。但是是否可以在PlayCover端进行修复呢?

@XuYicong commented on GitHub (Jul 15, 2023):
不确定原因是不是事件频率的问题,如果是的话理论上能修,可以跳过一些高频事件不处理。但也可能是其他原因,比如这个惯性导致的事件有一些特殊性质什么的。但我最近两个月事情比较多,这边只能鸽一鸽了orz
@XuYicong commented on GitHub (Jun 3, 2024):
I think I found the cause of this. It's because the touch point coordinates become extremely large and eventually crashes Genshin's camera system.
When implementing the scaling, two touch points are used to simulate a pinch gesture. When zooming in, they move apart from each other; when zooming out, they move towards each other. Due to some stupid design choice of myself, the moving speed of the two points would decrease exponentially when zooming out, and INCREASE EXPONENTIALLY when zooming in.
That would lead to touch point coordinates increase to an unbelievable large number in a really short time. As large as 1e17, which is 100000000000000000 (1 followed by 17 zeros). Based on testing, when this number increases above 1e19, this issue would occur. FYI, the largest number a signed 64-bit integer can represent is roughly 9e18. That coordinate must be overflowing some 64-bit integer somewhere inside the system.
"distance" in the following image means the distance between the two touch points.