Skip to content

core: In MovieClip's avm1_mouse_pick, don't check for AVM2 content#23462

Draft
ChrisCPI wants to merge 1 commit intoruffle-rs:masterfrom
ChrisCPI:mc-mouse-pick-cleanup
Draft

core: In MovieClip's avm1_mouse_pick, don't check for AVM2 content#23462
ChrisCPI wants to merge 1 commit intoruffle-rs:masterfrom
ChrisCPI:mc-mouse-pick-cleanup

Conversation

@ChrisCPI
Copy link
Copy Markdown
Contributor

@ChrisCPI ChrisCPI commented Apr 15, 2026

This is theoretically not possible, because AVM2 movies loaded into AVM1 are always interpreted as AVM1 (#23183), and mouse_pick_avm1 is never run in AVM2.

@danielhjacobs danielhjacobs added waiting-on-review Waiting on review from a Ruffle team member A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup labels Apr 15, 2026
Copy link
Copy Markdown
Member

@kjarosh kjarosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kjarosh kjarosh removed the waiting-on-review Waiting on review from a Ruffle team member label Apr 15, 2026
@ChrisCPI
Copy link
Copy Markdown
Contributor Author

Turns out this isn't entirely correct; SWF 9 allows for moving AVM1 content outside of the parenting Loader. Will revert the changes to mouse_pick_avm2 and add a comment there explaining this.

This is theoretically not possible, because AVM2 movies loaded into AVM1 are always interpreted as AVM1 (ruffle-rs#23183), and `mouse_pick_avm1` is never run in AVM2.
@ChrisCPI ChrisCPI force-pushed the mc-mouse-pick-cleanup branch from d02251f to e25c9dc Compare April 16, 2026 02:21
@ChrisCPI ChrisCPI changed the title core: In MovieClip mouse picks, don't check for if a child is the other AVM core: In MovieClip's avm1_mouse_pick, don't check for AVM2 content Apr 16, 2026
@ChrisCPI ChrisCPI requested a review from kjarosh April 16, 2026 02:22
@kjarosh
Copy link
Copy Markdown
Member

kjarosh commented Apr 16, 2026

Can you add a test for that case?

@ChrisCPI
Copy link
Copy Markdown
Contributor Author

Moving the avm1 movie outside the loader is already covered in the mixed_avm/avm2_loads_avm1_v9 test, but not specifically for mouse picking (it has some inaccuracies anyway, which I’m looking into, but won’t be for this pr).

@kjarosh
Copy link
Copy Markdown
Member

kjarosh commented Apr 16, 2026

We should add a test for mouse picking specifically. The previous version of the PR should fail tests.

@ChrisCPI ChrisCPI marked this pull request as draft April 19, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core player, where no other category fits T-refactor Type: Refactor / Cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants