Skip to content

core: Fix LoaderDisplay's mouse picking for AVM1 content#23574

Merged
kjarosh merged 1 commit intoruffle-rs:masterfrom
ChrisCPI:fix-loader-avm1-mouse-pick
Apr 29, 2026
Merged

core: Fix LoaderDisplay's mouse picking for AVM1 content#23574
kjarosh merged 1 commit intoruffle-rs:masterfrom
ChrisCPI:fix-loader-avm1-mouse-pick

Conversation

@ChrisCPI
Copy link
Copy Markdown
Contributor

Description

There are two main changes here:

  • Similarly to core: Fix MovieClip's AVM2 mouse picking for AVM1 content #23468, when mouse_pick_avm1 returns None, instead of counting it as a Miss, continue with the hit_test_shape check, allowing the hit to still propagate to the Loader.
  • When mouse_pick_avm1 does return Some, then combine the result with the Loader. Prior to this it did not take the mouseChildren property on the Loader into account.

Testing

Added the avm2/mouse_pick_loader_avm1 test to click in various places on/near a LoaderDisplay that has loaded an AVM1 movie.

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

Comment thread core/src/display_object/loader_display.rs Outdated
Comment thread core/src/display_object/loader_display.rs
@ChrisCPI ChrisCPI force-pushed the fix-loader-avm1-mouse-pick branch from e78c2e8 to 21ac2be Compare April 28, 2026 21:34
@ChrisCPI ChrisCPI requested a review from kjarosh April 28, 2026 21:34
@ChrisCPI ChrisCPI force-pushed the fix-loader-avm1-mouse-pick branch from 21ac2be to ca31985 Compare April 28, 2026 21:46
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.

Thank you! That's a very nice test.

@kjarosh kjarosh added mixed-avm Mixing AVM1 and AVM2 T-fix Type: Bug fix (in something that's supposed to work already) A-avm2 Area: AVM2 (ActionScript 3) labels Apr 29, 2026
- When `mouse_pick_avm1` returns `None`, instead of counting it as a `Miss`, continue with the `hit_test_shape` check, allowing the hit to still propagate to the Loader.
- When `mouse_pick_avm1` *does* return `Some`, then combine the result with the Loader. Prior to this it did not take the `mouseChildren` property on the Loader into account.
@kjarosh kjarosh force-pushed the fix-loader-avm1-mouse-pick branch from ca31985 to bf19ead Compare April 29, 2026 21:59
@kjarosh kjarosh enabled auto-merge (rebase) April 29, 2026 21:59
@kjarosh kjarosh merged commit 216de0f into ruffle-rs:master Apr 29, 2026
26 checks passed
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request May 3, 2026
-------------------------------------------------------------------------------------
zmusic.mk d3b730795784bff3f97571446101c57c1c6ac9bc # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------
CoreMIDIDevice: Fix potential crash when enumerating device names (#93),

--------------------------------------------------------------------------------------------------------
batocera-emulationstation.mk 577cb692711ab522b4d1d04e3d6e2d7ba7b8c29d # Version: Commits on Apr 29, 2026
--------------------------------------------------------------------------------------------------------
Merge pull request #2121 from Tartifless/master

Add teknoparrot mission impossible,

------------------------------------------------------------------------------------------------
batocera-es-piboy.mk 577cb692711ab522b4d1d04e3d6e2d7ba7b8c29d # Version: Commits on Apr 29, 2026
------------------------------------------------------------------------------------------------
Merge pull request #2121 from Tartifless/master

Add teknoparrot mission impossible,

-------------------------------------------------------------------------------------
azahar.mk f6ebfb2c6ff429083c6e58db8c0a2eda83b41213 # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------
macOS: normalize SDMC directory filenames (#2080)

* macOS: normalize SDMC directory filenames

* Guard macOS filename normalization behind __APPLE__

* Guard macOS filename normalization test

* Apply clang-format

* Update license headers,

------------------------------------------------------------------------------------------
dolphin-emu.mk ecfaa95e5afbb738833c0c979e7a32aff777526e # Version: Commits on Apr 29, 2026
------------------------------------------------------------------------------------------
Merge pull request #14543 from spaceage64/add-classic-controller-codes

Update/Add cheats for Animal Crossing: City Folk,

------------------------------------------------------------------------------------------
duckstation.mk 6c63902866541a7437be3769c2eaad5aa04c5906 # Version: Commits on Apr 30, 2026
------------------------------------------------------------------------------------------
Fix translation errors (AZ) (#3730)

* Change Azerbaijani translation entry to 'Azərbaycanca'

* Translation Update (AZ)

* Add Azerbaijani contributor bilginGamer

* Fix Translation (AZ),

--------------------------------------------------------------------------------------
melonds.mk a4d41faae34da170a19aad859e748af0aafa2e6d # Version: Commits on Apr 30, 2026
--------------------------------------------------------------------------------------
Fix occasional segfault on exit caused by emuIsActive being called after

the EmuThread is destroyed,

----------------------------------------------------
pcsx2.mk v2.7.306 # Version: Commits on Apr 30, 2026
----------------------------------------------------
- [GSRunner: Add -debugdevice command line parameter.](PCSX2/pcsx2#14376)

,

------------------------------------------------------------------------------------
rpcs3.mk d773a3f94e02f1ff66879899232d75f45e2bf17e # Version: Commits on Apr 30, 2026
------------------------------------------------------------------------------------
ci: Bump docker version and use rpcs3 dropbox URL for vulkan SDK,

---------------------------------------------------------------------------------------
touchhle.mk 94dab1c24a81b194d09b9eb9391da2a86d975d2b # Version: Commits on Aug 06, 2025
---------------------------------------------------------------------------------------
Add full implementation for selectors in run loops

Adds a full implementation of performSelector:onMainThread:(etc). App-

specific hacks are left in due to issues with the MPMoviePlayer

implementation.

Co-authored-by: ciciplusplus <ciciplusplus@gmail.com>

Change-Id: Id26ebc179afd26d73408fb29cd788bae32399e04,

-------------------------------------------------
vice.mk r46086 # Version: Commits on Apr 30, 2026
-------------------------------------------------
null

-------------------------------------------------------------------------------------
vita3k.mk 526e00c03834d26366d5519909226fa31565c436 # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------
bgm player: Remove dependency of (Gui/EmuEnv)State.

- Send only pref path and state of option.,

-----------------------------------------------------------------------------------
ymir.mk 15de3af5a67f50c86aaa289449d2e13827337887 # Version: Commits on Apr 30, 2026
-----------------------------------------------------------------------------------
fix(media): Fix PREGAP/POSTGAP handling in CUE sheets and detect bad VF2 dumps

Fixes various audio track shifting issues with ImgBurn dumps and that one bad VF2 dump,

-------------------------------------------------------------------------------------
ikemen.mk 8cb9da6cae156c560bfc65901c006abb4845123c # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------
Merge pull request #3567 from SuperFromND/gamewidth-fix

fix: Use float versions of gameWidth/gameHeight for w/hScale & render origin,

---------------------------------------------------------------
ruffle.mk nightly-2026-04-30 # Version: Commits on Apr 30, 2026
---------------------------------------------------------------
## What's Changed

* refactor: Remove mut references where not needed by @kjarosh in ruffle-rs/ruffle#23575

* avm1: Fix remaining clippy::collapsible_if and reenable lint by @kjarosh in ruffle-rs/ruffle#23573

* chore: Fix and reenable clippy::needless_pass_by_ref_mut in some places by @kjarosh in ruffle-rs/ruffle#23579

* chore: Change h1 to h2 headers in PR template by @kjarosh in ruffle-rs/ruffle#23581

* core: Fix LoaderDisplay's mouse picking for AVM1 content by @ChrisCPI in ruffle-rs/ruffle#23574

* core: Cleanup some `SwfSlice/buffer::Slice` code by @moulins in ruffle-rs/ruffle#23124

**Full Changelog**: ruffle-rs/ruffle@nightly-2026-04-29...nightly-2026-04-30,

----------------------------------------------------------------------------------------------------
gamenetworkingsockets.mk fa489fd2cb0fc86ef2503e330935d3eb03a6a064 # Version: Commits on Apr 30, 2026
----------------------------------------------------------------------------------------------------
Fix size limit on send function that accepts a buffer,

---------------------------------------------------------------------------------------
etlegacy.mk 288f66362339790aa46b8208c694bde3925ac42e # Version: Commits on Apr 30, 2026
---------------------------------------------------------------------------------------
game: prevent restricted weapon slots from ghost-blocking across map changes (#3375) (#3437)

  When a player switched weapons in limbo (e.g. Soldier Panzer -> Medic thomp/mp40), the

  stale playerWeapon field was never cleared because it is only synced

  from latchPlayerWeapon at spawn time in ClientSpawn. G_TeamCount()

  checked both fields unconditionally, so the old weapon permanently

  occupied a restricted slot  surviving map rotations via session

  persistence.

  - g_cmds.c: G_TeamCount() now only considers latchPlayerWeapon for

    dead/limbo/spectator players, ignoring the stale playerWeapon

  - g_session.c: G_WriteClientSessionData() writes latchPlayerWeapon

    into the playerWeapon session field for dead/limbo players so

    stale values are never persisted to disk,

------------------------------------------------------------------------------------------
fallout2-ce.mk 2f491fa6d594d2f7610069f022dc27d8b81f3ecc # Version: Commits on Apr 30, 2026
------------------------------------------------------------------------------------------
HOOK_EXPLOSIVETIMER (#423),

-------------------------------------------------------------------------------------
clevis.mk 23679e1a4d0a48f5f5f1b9c284f8ed8a5120f52a # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------
Enable Packit CI (#553)

* Enable Packit CI

* Added fmf initialization

* Trigger Packit CI

* Fix .packit.yaml

* Allow internal_tf ranch for provisioning

* Fix structure of the jobs

* Trigger Packit CI

* Add c9s for sanity clevis testing,

----------------------------------------------------------------------------------------
retroarch.mk caeecd546385703bdc3b2a14f1ca93552d235984 # Version: Commits on Apr 30, 2026
----------------------------------------------------------------------------------------
Cleanup some of the overly verbose logging in coreaudio_mic,

---------------------------------------------------------------------------------------
libzedmd.mk 089438abaf409fc7ab5334b71740fe4c9a1a3172 # Version: Commits on Apr 30, 2026
---------------------------------------------------------------------------------------
added line decoder support for ESPs,

---------------------------------------------------------------------------------------
vpinball.mk 8b8048fc7b3cdb84232dfa4e684d8ba526dfcfc5 # Version: Commits on Apr 30, 2026
---------------------------------------------------------------------------------------
Fix invalid DX12 assignment instead of test,

-------------------------
spirv-cross.mk  NULL-NULL
-------------------------
No commit found for SHA: vulkan-tmp-1.4.349,

----------------------------------------------------------------------------------------
doomretro.mk 7fd4943c7fe5a4bd8e729d4c6d0f2d5cc9196799 # Version: Commits on Apr 30, 2026
----------------------------------------------------------------------------------------
Fix Legacy of Rust chars attempt to display in DOOM II cast sequence,

---------------------------------------------------------------------------------------------
libretro-citra.mk f6ebfb2c6ff429083c6e58db8c0a2eda83b41213 # Version: Commits on Apr 30, 2026
---------------------------------------------------------------------------------------------
macOS: normalize SDMC directory filenames (#2080)

* macOS: normalize SDMC directory filenames

* Guard macOS filename normalization behind __APPLE__

* Guard macOS filename normalization test

* Apply clang-format

* Update license headers,

--------------------------------------------------------------------------------------------------
libretro-gearcoleco.mk 91e44f1977cf247ae12b7f4860a53f35808faa26 # Version: Commits on Apr 30, 2026
--------------------------------------------------------------------------------------------------
Add master volume audio option,

-------------------------------------------------------------------------------------------------
libretro-geargrafx.mk e7360f40021b9a14e3d64b450cabba35677f05df # Version: Commits on Apr 30, 2026
-------------------------------------------------------------------------------------------------
Add master volume audio option,

--------------------------------------------------------------------------------------------------
libretro-gearsystem.mk 13da404af6b9aa623e97b0d220cd586f3fe364aa # Version: Commits on Apr 30, 2026
--------------------------------------------------------------------------------------------------
Add master volume audio option,

----------------------------------------------------------------------------------------------
libretro-stella.mk facff18130229099e2cc97e919c4324d029d731e # Version: Commits on Apr 30, 2026
----------------------------------------------------------------------------------------------
Fixes for minor warnings from clang-tidy.,

---------------------------------------------------------------------------------------------
libretro-vba-m.mk eb5163aa5ed59f8b601acaeb2e5c37395e47d7bb # Version: Commits on Apr 30, 2026
---------------------------------------------------------------------------------------------
build: add lua to vcpkg deps list

Add `lua` to the list of dependency ports from vcpkg.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>,
@ChrisCPI ChrisCPI deleted the fix-loader-avm1-mouse-pick branch May 6, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm2 Area: AVM2 (ActionScript 3) mixed-avm Mixing AVM1 and AVM2 T-fix Type: Bug fix (in something that's supposed to work already)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with mouse focus change event [Bug]Games that previously worked will not be able to progress in the new version.

2 participants