core: Return version from MovieClip::swf_version (fix #1086)

MovieClip was not returning the proper SWF version, causing it to
default to the newest SWF version in some cases when it shouldn't.
This commit is contained in:
Mike Welsh 2020-09-01 16:39:05 -07:00
parent f7bd1b10ab
commit bc08971066
2 changed files with 4 additions and 3 deletions

View File

@ -1063,9 +1063,6 @@ macro_rules! impl_display_object_sansbounds {
.$field .$field
.set_transformed_by_script(value) .set_transformed_by_script(value)
} }
fn swf_version(&self) -> u8 {
self.0.read().$field.swf_version()
}
fn instantiate( fn instantiate(
&self, &self,
gc_context: gc_arena::MutationContext<'gc, '_>, gc_context: gc_arena::MutationContext<'gc, '_>,

View File

@ -1012,6 +1012,10 @@ impl<'gc> TDisplayObject<'gc> for MovieClip<'gc> {
Some(self.0.read().movie()) Some(self.0.read().movie())
} }
fn swf_version(&self) -> u8 {
self.0.read().movie().version()
}
fn run_frame(&self, context: &mut UpdateContext<'_, 'gc, '_>) { fn run_frame(&self, context: &mut UpdateContext<'_, 'gc, '_>) {
// Children must run first. // Children must run first.
for child in self.children() { for child in self.children() {