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

simbatt: Fix broken registry read-back #1064

Merged

Conversation

forderud
Copy link
Contributor

The GetSimBattStateFromRegistry function is currently using default settings if GetSimBattStateFromRegistry succeeds, whereas settings from registry are only applied if GetSimBattStateFromRegistry fails. This does not make sense to me.

Therefore proposing to remove the ! negation from if (!NT_SUCCESS(Status)) { on the line after Status = GetSimBattStateFromRegistry(Device, RegState); so that default settings are loaded when registry read-back fails.

@forderud forderud force-pushed the GetSimBattStateFromRegistry-fix branch from 639da64 to fa4567b Compare January 31, 2024 11:27
@forderud
Copy link
Contributor Author

forderud commented May 3, 2024

Gentle reminder.

The GetSimBattStateFromRegistry function is currently using default settings if GetSimBattStateFromRegistry succeeds, whereas settings from registry are only applied if GetSimBattStateFromRegistry fails. This does not make sense to me.

Therefore proposing to remove the `!` negation from `if (!NT_SUCCESS(Status)) {` on the line after `Status = GetSimBattStateFromRegistry(Device, RegState);` so that default settings are loaded when registry read-back fails.
@forderud forderud force-pushed the GetSimBattStateFromRegistry-fix branch from fa4567b to 54466da Compare May 3, 2024 10:31
@forderud forderud requested a review from a team as a code owner May 3, 2024 10:31
@JakobL-MSFT JakobL-MSFT deleted the branch microsoft:develop May 22, 2024 16:08
@forderud
Copy link
Contributor Author

@JakobL-MSFT Is it possible to get some kind of explanation for why this PR was closed instead of being considered for merging? Am I misunderstanding something, or don't you want to fix bugs in the sample code?

@JakobL-MSFT
Copy link
Contributor

I closed this PR unintentionally. I apologize. I am reopening the PR.

@JakobL-MSFT JakobL-MSFT reopened this May 22, 2024
@forderud
Copy link
Contributor Author

forderud commented Jun 6, 2024

@JakobL-MSFT @tristanb-ntdev Anything holding back merging of this bugfix?

@tristanb-ntdev tristanb-ntdev merged commit dbfbead into microsoft:develop Jun 18, 2024
8 checks passed
@forderud forderud deleted the GetSimBattStateFromRegistry-fix branch June 18, 2024 19:06
This pull request was closed.
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.

3 participants