fix(macos): Mouse input broken in-game
Description
This issue was initially reported on Discord
Basically, we have 2 main issues:
- The cursor sometimes keeps showing on the screen even when it should not appear;
- While the cursor moves on the screen, some 3D engines can't capture the movements and cannot move mechanisms bound to the mouse, such as Camera, Object Rotation, etc.
The behavior can be reproduced on Minecraft Java Edition and Tomb Raider. FPS games are mostly prone, some games may not really have issues, but I bet most 3D FPS are failing.
Screenshot
bug:
fixed:
Issues Fixed or Closed
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [ ] Documentation update (changes to documentation)
- [x] Repository update (changes to repository files, e.g.
.github/...)
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.
- [x] I want maintainers to keep my branch updated
Codecov Report
Attention: Patch coverage is 65.21739% with 24 lines in your changes missing coverage. Please review.
Project coverage is 9.69%. Comparing base (
886d88b) to head (84183af). Report is 164 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2550 +/- ##
=========================================
+ Coverage 7.98% 9.69% +1.70%
=========================================
Files 88 88
Lines 18039 18070 +31
Branches 8596 8605 +9
=========================================
+ Hits 1441 1752 +311
+ Misses 15828 13491 -2337
- Partials 770 2827 +2057
| Flag | Coverage Δ | |
|---|---|---|
| Linux | 8.42% <63.15%> (+2.37%) |
:arrow_up: |
| Windows | 3.78% <50.00%> (+0.01%) |
:arrow_up: |
| macOS-12 | 9.75% <70.00%> (+0.73%) |
:arrow_up: |
| macOS-13 | ? |
|
| macOS-14 | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/platform/common.h | 32.50% <ø> (-1.25%) |
:arrow_down: |
| src/utility.h | 28.50% <100.00%> (+0.67%) |
:arrow_up: |
| src/platform/windows/input.cpp | 0.40% <0.00%> (-0.01%) |
:arrow_down: |
| src/platform/linux/input.cpp | 26.13% <58.82%> (+25.94%) |
:arrow_up: |
| src/platform/macos/input.cpp | 36.78% <68.75%> (+34.32%) |
:arrow_up: |
Rebase with #2606 before moving from draft