summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/apple2e.cpp
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2020-10-10 20:07:26 -0400
committer arbee <rb6502@users.noreply.github.com>2020-10-10 20:07:26 -0400
commit7565bc295609f4a61f066170abea6418d49ffe7c (patch)
treeae588b840a8881b01a1686d69619a9ef5f528f31 /src/mame/drivers/apple2e.cpp
parent85d8d885f8872347970546fb180f27a16f4e44af (diff)
apple2e.cpp: srcclean and reformat an if/else.
Diffstat (limited to 'src/mame/drivers/apple2e.cpp')
-rw-r--r--src/mame/drivers/apple2e.cpp23
1 files 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;