mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-18 01:30:56 +00:00
Now honours permitted mouse range.
This commit is contained in:
parent
153f60735d
commit
017681a97c
@ -72,6 +72,10 @@ void IntelligentKeyboard::run_for(HalfCycles duration) {
|
|||||||
mouse_position_[0] += scaled_movement[0];
|
mouse_position_[0] += scaled_movement[0];
|
||||||
mouse_position_[1] += mouse_y_multiplier_ * scaled_movement[1];
|
mouse_position_[1] += mouse_y_multiplier_ * scaled_movement[1];
|
||||||
|
|
||||||
|
// Clamp to range.
|
||||||
|
mouse_position_[0] = std::min(std::max(mouse_position_[0], 0), mouse_range_[0]);
|
||||||
|
mouse_position_[1] = std::min(std::max(mouse_position_[1], 0), mouse_range_[1]);
|
||||||
|
|
||||||
mouse_movement_[0] -= scaled_movement[0] * mouse_scale_[0];
|
mouse_movement_[0] -= scaled_movement[0] * mouse_scale_[0];
|
||||||
mouse_movement_[1] -= scaled_movement[1] * mouse_scale_[1];
|
mouse_movement_[1] -= scaled_movement[1] * mouse_scale_[1];
|
||||||
} break;
|
} break;
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user