From 7565bc295609f4a61f066170abea6418d49ffe7c Mon Sep 17 00:00:00 2001 From: arbee Date: Sat, 10 Oct 2020 20:07:26 -0400 Subject: apple2e.cpp: srcclean and reformat an if/else. --- src/mame/drivers/apple2e.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp index ade5472f41d..4a244d12f2f 100644 --- a/src/mame/drivers/apple2e.cpp +++ b/src/mame/drivers/apple2e.cpp @@ -2390,10 +2390,16 @@ void apple2e_state::update_iic_mouse() /* check for wrap */ if (diff > 0x80) + { diff -= 0x100; + } else - if (diff < -0x80) - diff += 0x100; + { + if (diff < -0x80) + { + diff += 0x100; + } + } count_x += diff; last_mx = new_mx; @@ -2406,9 +2412,16 @@ void apple2e_state::update_iic_mouse() /* check for wrap */ if (diff > 0x80) - diff = 0x100-diff; - if (diff < -0x80) - diff = -0x100-diff; + { + diff -= 0x100; + } + else + { + if (diff < -0x80) + { + diff += 0x100; + } + } count_y += diff; last_my = new_my; -- cgit v1.2.3-70-g09d2