summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ioport.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2017-11-21 14:02:39 -0500
committer AJR <ajrhacker@users.noreply.github.com>2017-11-21 14:04:20 -0500
commit03b46122dee4024da4c38eb2aaac5ffe2be4ff36 (patch)
tree1cf24131603f45eb2625d0c6c27e0735dc517b84 /src/emu/ioport.cpp
parent0fd5d5abc257568d0827a6116d27e511d59baf72 (diff)
Fix core rounding error with analog input sensitivity scaling (nw)
Diffstat (limited to 'src/emu/ioport.cpp')
-rw-r--r--src/emu/ioport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 0538207b46b..d76804a9573 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -3429,7 +3429,7 @@ inline s32 analog_field::apply_min_max(s32 value) const
inline s32 analog_field::apply_sensitivity(s32 value) const
{
- return s32((s64(value) * m_sensitivity) / 100.0 + 0.5);
+ return lround((s64(value) * m_sensitivity) / 100.0);
}