diff options
| author | 2024-08-27 02:34:48 +1000 | |
|---|---|---|
| committer | 2024-08-27 02:34:48 +1000 | |
| commit | 5395cbcea2ba20478753e121208aad75c0ae6605 (patch) | |
| tree | 067d1ac681da2a0dcebfa35b844bddda86ee8709 | |
| parent | 617d79b2a1355d1f6276d9d2785a8c9430fbdb2c (diff) | |
-ui/menu.cpp: Avoid floating point equality comparison.
* Fixes pointer input not working on menus at some window sizes in
32-bit x86 builds.
-leapfrog_leappad_cart.xml: Fixed a description.
| -rw-r--r-- | hash/leapfrog_leappad_cart.xml | 2 | ||||
| -rw-r--r-- | src/frontend/mame/ui/menu.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hash/leapfrog_leappad_cart.xml b/hash/leapfrog_leappad_cart.xml index df1e8b88f11..a093848c7f6 100644 --- a/hash/leapfrog_leappad_cart.xml +++ b/hash/leapfrog_leappad_cart.xml @@ -201,7 +201,7 @@ license:CC0-1.0 </software> <software name="smartguid4" supported="no"> - <description>FUN-damentals Series - Smart Guide to 4rd Grade (UK)</description> + <description>FUN-damentals Series - Smart Guide to 4th Grade (UK)</description> <year>2002</year> <publisher>LeapFrog</publisher> <info name="serial" value="500-00534"/> diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp index d6b6d29fccf..740a310e2f5 100644 --- a/src/frontend/mame/ui/menu.cpp +++ b/src/frontend/mame/ui/menu.cpp @@ -27,6 +27,7 @@ #include "osdepend.h" #include <cassert> +#include <cmath> #include <cstdlib> #include <limits> #include <type_traits> @@ -1930,7 +1931,7 @@ bool menu::check_metrics() render_target &target(render.ui_target()); std::pair<uint32_t, uint32_t> const uisize(target.width(), target.height()); float const aspect = render.ui_aspect(&container()); - if ((uisize == m_last_size) && (aspect == m_last_aspect)) + if ((uisize == m_last_size) && (std::fabs(1.0F - (aspect / m_last_aspect)) < 1e-6F)) return false; m_last_size = uisize; |
