fix: identify_display 中跟踪 _SetDeviceGammaRamp 返回值#2
Merged
Conversation
闪烁循环中之前忽略了 SetDeviceGammaRamp 的返回值,如果伽马写入被 静默拒绝(如远程桌面、权限不足),屏幕不会闪烁但函数仍返回 True。 修复后,在循环中检查每次调用的返回值,失败时记录警告并 break, 最终恢复后返回 False。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复
identify_display()在闪烁循环中忽略_SetDeviceGammaRamp返回值的问题。_SetDeviceGammaRamp的返回值False而非True测试
test_identify_flash_fails:模拟第一次闪白屏调用失败test_identify_blank_fails:模拟第一次闪黑屏调用失败