Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(macos): Mouse input broken in-game #2550

Merged
merged 22 commits into from
Jun 12, 2024

Conversation

Hazer
Copy link
Member

@Hazer Hazer commented May 21, 2024

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:
bug gif

fixed:
fixed gif

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • 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)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • 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.

  • I want maintainers to keep my branch updated

@Hazer Hazer marked this pull request as draft May 21, 2024 16:05
Copy link

codecov bot commented May 21, 2024

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.

Files with missing lines Patch % Lines
src/platform/macos/input.cpp 68.75% 10 Missing and 5 partials ⚠️
src/platform/linux/input.cpp 58.82% 3 Missing and 4 partials ⚠️
src/platform/windows/input.cpp 0.00% 2 Missing ⚠️
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%) ⬆️
Windows 3.78% <50.00%> (+0.01%) ⬆️
macOS-12 9.75% <70.00%> (+0.73%) ⬆️
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%) ⬇️
src/utility.h 28.50% <100.00%> (+0.67%) ⬆️
src/platform/windows/input.cpp 0.40% <0.00%> (-0.01%) ⬇️
src/platform/linux/input.cpp 26.13% <58.82%> (+25.94%) ⬆️
src/platform/macos/input.cpp 36.78% <68.75%> (+34.32%) ⬆️

... and 31 files with indirect coverage changes

@Hazer Hazer force-pushed the fix/macos-mouse-3d-move branch 2 times, most recently from 4c56f31 to 70a2223 Compare May 21, 2024 18:30
@Hazer Hazer force-pushed the fix/macos-mouse-3d-move branch 13 times, most recently from 30ad1a9 to aa16e27 Compare May 23, 2024 09:50
@Hazer Hazer requested a review from ReenigneArcher May 23, 2024 09:52
packaging/macos/sunshine_pr.rb Outdated Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
@Hazer Hazer force-pushed the fix/macos-mouse-3d-move branch 5 times, most recently from 8b63136 to 8388a43 Compare May 27, 2024 19:18
@Hazer
Copy link
Member Author

Hazer commented May 30, 2024

Rebase with #2606 before moving from draft

@Hazer Hazer marked this pull request as ready for review June 3, 2024 23:40
.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Show resolved Hide resolved
src/platform/windows/input.cpp Outdated Show resolved Hide resolved
@ReenigneArcher ReenigneArcher merged commit 02ddbef into LizardByte:master Jun 12, 2024
48 checks passed
@Hazer Hazer deleted the fix/macos-mouse-3d-move branch June 20, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants