mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
-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.
This commit is contained in:
parent
617d79b2a1
commit
5395cbcea2
2 changed files with 3 additions and 2 deletions
|
@ -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"/>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue