From 2b58f6416170270f5a0d68e48c279bb7f5ad28b0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 21 Aug 2023 22:12:55 -0400 Subject: [PATCH] Switch to maximal signalling rate. --- Machines/Apple/ADB/Mouse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Machines/Apple/ADB/Mouse.cpp b/Machines/Apple/ADB/Mouse.cpp index 60336a0b4..a514611b4 100644 --- a/Machines/Apple/ADB/Mouse.cpp +++ b/Machines/Apple/ADB/Mouse.cpp @@ -15,9 +15,9 @@ using namespace Apple::ADB; Mouse::Mouse(Bus &bus) : ReactiveDevice(bus, 3) {} void Mouse::perform_command(const Command &command) { - // This was picked empirically based on experimentation with the IIgs. - // Possible TODO: consider whether this is appropriate for other machines. - static constexpr int16_t max_delta = 30; + // Mouse deltas are confined to a seven-bit signed field; this implementation keeps things symmetrical by + // limiting them to a maximum absolute value of 63 in any direction. + static constexpr int16_t max_delta = 63; if(command.type == Command::Type::Talk && command.reg == 0) { // Read and clamp current deltas and buttons.