mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +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_[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_[1] -= scaled_movement[1] * mouse_scale_[1];
|
||||
} break;
|
||||
|
@ -67,7 +67,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
|
Loading…
Reference in New Issue
Block a user