Skip to content

Make sure the new scale is finite when setting the width/height of display objects.#3917

Merged
kmeisthax merged 3 commits intoruffle-rs:masterfrom
desuwa:finite_scale
Apr 7, 2021
Merged

Make sure the new scale is finite when setting the width/height of display objects.#3917
kmeisthax merged 3 commits intoruffle-rs:masterfrom
desuwa:finite_scale

Conversation

@desuwa
Copy link
Copy Markdown
Contributor

@desuwa desuwa commented Apr 7, 2021

Small change to fix a case where setting the width / height on an empty movie clip would lock its dimensions to zero.

A bunch of divisions by zero can happen inside set_width / set_height if the bounding box is empty which would set the scale to NaN. This would make the clip stuck with zero dimensions (_width and _height will always return 0 even if the bounding box changes) since the current scale is used to calculate the new scale as far as I understand.

Should fix #2006

@adrian17
Copy link
Copy Markdown
Collaborator

adrian17 commented Apr 7, 2021

This indeed seems to significantly improve MX components (see video). The only major things in games like IB seem to be the submenu white background and scroll buttons not appearing instantly.

2021-04-07_17-26-50.mp4

@kmeisthax kmeisthax merged commit 7554096 into ruffle-rs:master Apr 7, 2021
@desuwa desuwa deleted the finite_scale branch April 8, 2021 00:36
@Padre2
Copy link
Copy Markdown

Padre2 commented Apr 8, 2021

@desuwa

Many thanks for looking at this issue that I had opened in #3700 and #2006. I installed the 2021-04-08 nightly and was delighted that all the menus on the website I am working on appear to be functioning as they should and make selections possible.

As mentioned elsewhere, the menus were always able to open in Gecko-based browsers like Firefox, but did not allow selection.
In Windows, on Chromium-based browsers like Chrome and Edge, the menu did not open at all. By applying the flag Override software rendering they opened as in Firefox and Gecko-Based-browsers. After installing the new nightly, the Chromium-based browsers all opened as in Firefox and selections could be made. However, removing the flag, not only caused menus not to open, but the SWF file was very slow to load, i.e. much slower than with most previous nightlies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to select items from a drop-down menu

4 participants