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

avm2: Fix EditText and Graphic linkage #18770

Merged

Conversation

Lord-McSweeney
Copy link
Collaborator

No description provided.

@@ -4554,7 +4557,9 @@ impl<'gc, 'a> MovieClip<'gc> {
.library
.library_for_movie_mut(movie.clone());

match library.character_by_id(id) {
let character = library.character_by_id(id);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This needs to be duplicated (here and in lookup_class_for_character) to satisfy the borrow checker

Copy link
Collaborator

@adrian17 adrian17 Dec 2, 2024

Choose a reason for hiding this comment

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

I'm guessing Character should just become a Copy, if/when all its variants become Gc wrappers - that should solve it, right?
(not in this PR, I can try refactoring it as a followup)

core/src/display_object/movie_clip.rs Show resolved Hide resolved
core/src/avm2.rs Outdated Show resolved Hide resolved
@@ -4554,7 +4557,9 @@ impl<'gc, 'a> MovieClip<'gc> {
.library
.library_for_movie_mut(movie.clone());

match library.character_by_id(id) {
let character = library.character_by_id(id);
Copy link
Collaborator

@adrian17 adrian17 Dec 2, 2024

Choose a reason for hiding this comment

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

I'm guessing Character should just become a Copy, if/when all its variants become Gc wrappers - that should solve it, right?
(not in this PR, I can try refactoring it as a followup)

core/src/avm2.rs Show resolved Hide resolved
core/src/avm2.rs Outdated Show resolved Hide resolved
@adrian17
Copy link
Collaborator

adrian17 commented Dec 2, 2024

Oh, and I think the first commit should move to the end, since you said it's technically broken without the refactor, right?

@torokati44
Copy link
Member

(Could someone add a T-* and an A-* label please? 😶)

@danielhjacobs danielhjacobs added A-avm2 Area: AVM2 (ActionScript 3) T-fix Type: Bug fix (in something that's supposed to work already) labels Dec 3, 2024
@Lord-McSweeney Lord-McSweeney force-pushed the edittext-graphic-fixes branch 2 times, most recently from 1ec0562 to 9270fc6 Compare December 4, 2024 03:50
@Lord-McSweeney Lord-McSweeney enabled auto-merge (rebase) December 5, 2024 02:48
@Lord-McSweeney Lord-McSweeney merged commit 4d4e5f0 into ruffle-rs:master Dec 5, 2024
21 of 22 checks passed
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) 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.

4 participants