-
Notifications
You must be signed in to change notification settings - Fork 2k
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
replace hint-based relative speed/system mouse scale with a callback-based api #11449
Comments
This seems like a good idea to me, however the hint should probably be respected by default, to provide ABI compatibility with existing applications. @icculus, thoughts? |
Are hints considered a part of the ABI? |
Yes |
Considering that system scaling is only implemented for Windows, and that its implementation has been completely broken so far, it’s unlikely that anyone has coded against the hint at this point. If ever there is a time for an excusable ABI break on an inconsequential, unused, and broken hint it would be now, IMO. Similarly for relative speed scale, its fault lies in being user-alterable by default, so even if a developer has already coded against the hint, it would probably still be justified to break it now while it’s still early. I just think it’s a really, really bad idea to leave this user-alterable foot gun open by default requiring the developer to be aware of the foot gun in order to close it. It serves no purpose other than creating extra holes that devs need to patch out. Replacing it with a callback interface solves this issue of being yet-another-paranoid-cs-player-cargo-cult-config-option to obsess over while still permitting developers to have the functionality without worrying that end users will screw it up. |
Agreed. I would be okay with removing these hints at this point. |
Should I wait for the aforementioned PR to be vetted before working on this as its follow-up so that each change is self-contained, or would it be preferred that the non-breaking fix and the breaking rework be combined as one atomic PR to minimize cluttering the commits? |
Let's do this in steps. I'm coming around to your way of thinking about relative mouse mode too, having it not affect mouse position, so let me play with that before you go wild with this. |
At this point, given our other discussion and how close we are to release, let's go ahead and close this issue. |
This proposal suggests the following:
Rationale:
For the above reasons, it makes much more sense to have these transform behavior be made available and customizable as a callback interface, rather than being locked into a few specific knobs that satisfies no one.
For SDL-implemented platform-specific transforms, SDL can provide an interface that returns a pointer to the function, which the developer can then supply to the callback interface, or employ it directly in their own code outside of the intended callback.
The function prototype of the callback should optionally accept an opaque pointer to any stateful configuration data to be associated with the callback, such as residual tracking or smoothing history. User-defined function can choose not to bother with this pointer, but the SDL-implemented system transform should use it for its stateful data so that users may be able to supply their own state when using it outside of the callback system.
The text was updated successfully, but these errors were encountered: