-
Notifications
You must be signed in to change notification settings - Fork 316
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: ISXB-925 Fixed an issue where changing InputSettings instance fo… #1954
Conversation
…r the Input System wouldn't affect feature flags.
… runtime IOCTL command flag on non-Windows platforms leading to debug error log entries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my FEPM refactoring worksheet, I didn't touch these static fields, since determined it wasn't necessary for CoreCLR support. However, there may still be conflicts.
I recommend checking these changes against my FEPM refactor branch to make sure isn't anything too complicated, otherwise porting this to Neutron will be a pain.
internal bool m_OptimizedControlsFeatureEnabled; | ||
internal bool m_ReadValueCachingFeatureEnabled; | ||
internal bool m_ParanoidReadValueCachingChecksEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please change these to private fields and add an internal read-only accessor property?
When refactoring for CoreCLR support, internal fields were very frustrating because I had to check the entire code base for any usages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This have been adressed now in c93e565
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding FWPM refactor I think this is straightforward since ApplySettings seem intact.
…al getters instead. Removed WindowsGamingInputBackend feature flag from test since generating error. This is handled in a separate PR as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change!
@@ -2116,6 +2117,33 @@ internal struct AvailableDevice | |||
internal IInputRuntime m_Runtime; | |||
internal InputMetrics m_Metrics; | |||
internal InputSettings m_Settings; | |||
|
|||
// Extract as booleans (from m_Settings) because feature check is in the hot path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
…r the Input System wouldn't affect feature flags.
Description
The optimization flags within InputSettings were stored as static fields for performance reasons. This makes little sense from API perspective where these are set and evaluated using a non-static API. This also leads to switching InputSettings instance having no impact on current settings. As long as these are exposed via this API they should not be static. However, I added extraction of the settings into InputManager which is represented by a static and used direct access from where its used so expecting little if any impact.
Adressing:
Changes made
Note that this fix also includes #1955 since the test case would otherwise fail with debug error log on non Windows platforms.
Testing
Added 1 test case for scenario
Settings_ShouldStoreSettingsAndFeatureFlags(string featureName)
. I didn't add a new test category at this point since none of the existing fits well so I left the test case uncategorised.Risk
Potential risk is features not being enabled correctly for some corner-case scenarios.
Checklist
Before review:
Changed
,Fixed
,Added
sections.Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
.During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: