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

Desktop Ruffle delay when tracking mouse coordinates #19211

Open
KupoGames opened this issue Jan 13, 2025 · 3 comments
Open

Desktop Ruffle delay when tracking mouse coordinates #19211

KupoGames opened this issue Jan 13, 2025 · 3 comments
Labels
A-rendering Area: Rendering & Graphics bug Something isn't working render-wgpu Issues relating to the wgpu renderer windows Windows-specific issues

Comments

@KupoGames
Copy link

Describe the bug

There seems to be a significant delay in Ruffle when tracking the mouse coordinates, that doesn't happen in Flashplayer.
This seems to only happen in Desktop Ruffle, and not in the browser version.

Here's an example of my code:

`stage.addEventListener(Event.ENTER_FRAME, onFrame);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

//mouse1 and mouse2 are MovieClips imitating a cursor

function onFrame(e:*){
mouse1.x = mouseX;
mouse1.y = mouseY;
}

function onMouseMove(e:*){
mouse2.x = mouseX;
mouse2.y = mouseY;
}`

In Flashplayer my new cursor "mouse1" seems to track the system mouse perfectly, maybe 1 frame behind.
In Desktop Ruffle, it feels like 5 or 6 frames behind the system mouse, and ENTER_FRAME and MOUSE_MOVE give slightly different results.
This seems to effect dragging behaviour also.

Here's a .gif of the issue:
Image

@kjarosh

Expected behavior

The browser version of Ruffle seems to work correctly, the delay only happens on Desktop.

Content Location

Code in the description.

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

No response

@KupoGames KupoGames added the bug Something isn't working label Jan 13, 2025
@kjarosh
Copy link
Member

kjarosh commented Jan 14, 2025

Can you attach the SWF?

@KupoGames
Copy link
Author

Can you attach the SWF?

I don't know how to attach it on GitHub, so here's a Dropbox link:
https://www.dropbox.com/scl/fi/r6plsx7xqp18647deihtm/cursor-test.swf?rlkey=5zgtiojgtuqbkk39saaw0cjer&dl=0

@kjarosh
Copy link
Member

kjarosh commented Jan 14, 2025

I moved the issue with desynchronized cursors to #19222, let's track the delay only here.

@kjarosh kjarosh added A-rendering Area: Rendering & Graphics render-wgpu Issues relating to the wgpu renderer windows Windows-specific issues labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rendering Area: Rendering & Graphics bug Something isn't working render-wgpu Issues relating to the wgpu renderer windows Windows-specific issues
Projects
None yet
Development

No branches or pull requests

2 participants