Skip to content

[Migrated to PR #644] Gyro Aiming support#591

Closed
AL2009man wants to merge 206 commits intofgsfdsfgs:portfrom
AL2009man:Gyro-Aim
Closed

[Migrated to PR #644] Gyro Aiming support#591
AL2009man wants to merge 206 commits intofgsfdsfgs:portfrom
AL2009man:Gyro-Aim

Conversation

@AL2009man
Copy link
Copy Markdown

@AL2009man AL2009man commented Mar 28, 2025

migrated to #644

While all sliders and toggles are not functionable: it'll be the bridge.
given the value is from 0.01 to 10.00, I expect it'll be similar
For some reason: this sourceport isn't using it. this is very crucial inorder to add Gyro Aiming support
This adds Gyro Aim modes where you can choose between Camera, Crosshair or Camera+Crosshair (the default), and both Crosshair Speeds are added.

the Gyro Menu was also reorganized.
Gyro Modifier is connected to "Gyro Activation" button, which will cover Gyro Toggle and Gyro Hold (and the reverse version).
at somepoint: a portion of the gyro code got broken. this has been restored alongside
Crosshair Aiming for Gyro has been fixed. Right now: Gyro Axis is broken-- but that will be fixed later
the button is now functionable.
Rebuild the entire gyro-based codebase inorder to solve a specific problem with mouse-related settings
after hours, it turns out that handleSensorUpdate was the culprit to the incorrect gyro axis.
backport changes over to GyroAim-WIP
When the Window focus is lost: Gyro Input will continue to move ittself. This introduces a new flag where all Inputs (including Gyro) will be pause whenever the Window focus is lost.

This function can be disabled within pd.ini
forgot to move that comment note to `inputHasWindowFocus`
decided to clean up and try to centralize minor parts of Gyro Calibration.
@AL2009man AL2009man requested a review from fgsfdsfgs July 20, 2025 19:43
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Jul 20, 2025

@fgsfdsfgs i've been doing final preparations (and hopefully addressing nearly all the issues raised and final batch of organization change to prevent the "overcomplication code" as best as I can) to prepare for another review request.

While I've tested it on both Windows 11 and Linux (via Steam Deck): I don't have access to MacOS nor Nintendo Switch console (for homebrew), so I might need assistance on that front.

that being said: due to commit history being bloated: I suggest using the "Squash" merge if you plan to merge it on this PR. I got no problem making a "duplicated PR" to avoid commit bloat if needed.

edit 1: Ok, I believe I caught all the necessary bugs, I think everything will be locked in going forward.

AL2009man added 18 commits July 20, 2025 19:25
cleaned up Gyro AutoCalibration process for abit, alongside additional notes to better explain the process, with some sysLogPrintf (it might be removed in the next commit?)
reorganized Gyro Calibration handle to make it easier to actually read and organize
centralized both Crosshair scaling logic, and Camera/Crosshair Recentering logic to address duplicated issues, while fixing Camera Recenter when using Hoverboard
Added 3 new ways to Auto-Calibrate your Gyro, inspirited by Fortnite's new Calibration option

- Disabled: Will disable Gyro Autocalibration
- While In Menu: Will Auto Calibrate the Gyro only in a Menu dialog.
   -  this reuses the existing Gyro Autocalibration feature as before, same timer too!
   - This is now the default.
- While Stationary: Will autocalibrate Gyro when the Controller is placed on a flat surface/stationary
- Always: will try to autocalibrate the Controller whenever possible, will be more drift-prone.

Additionally: "While in Menus" and "Disabled" now shares the same Gyro Calibration saved offset, to better match how Fortnite handles their calibration setup.
at some point during the cleanup: a bug related to Gyro Calibration got slipped thru. This should be fixed.
@AL2009man AL2009man marked this pull request as draft August 11, 2025 04:41
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Aug 11, 2025

hold on, i'm putting this PR on hold temporarily, as I'm cleaning up the Gyro Calibration stuffs.

that being said: there's a likely chance that Gyro Aiming PR will have be moved over to a new PR to avoid large commit history, as i have no idea if all of this will be regular merge, or squash

in a effort to minimize the amount of bloat whenever possible: the entire system has been cleaned up, with improved detection rate during AutoCalibration.
@AL2009man AL2009man closed this Aug 11, 2025
@AL2009man
Copy link
Copy Markdown
Author

AL2009man commented Aug 11, 2025

Based on how the repository manager handles PR Merge, I ultimately decided to spare the pain by moving to a separate PR that will have far less commit history. Unless there's last minute bugs or maintainer-led request: there won't be anymore changes after this.

#644

@AL2009man AL2009man changed the title Gyro Aiming support [Migrated to PR #644] Gyro Aiming support Aug 11, 2025
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