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

fix(draw): fix "blend_non_normal_pixel: Not supported blend mode" issue when using lv_demo_smartwatch which compiled by MSVC #8017

Merged

Conversation

MouriNaruto
Copy link
Contributor

@MouriNaruto MouriNaruto commented Mar 28, 2025

image

In the recent days, one of LVGL Visual Studio repository users told me that there are some issues mentioned in the screenshot when he trying to use lv_demo_smartwatch.

This issue seems something familiar for me. So, I solve the issue for that user quickly. I think I should create a PR instead of an issue, and hope the issue can be fixed as soon as possible.

Kenji Mouri

@uLipe
Copy link
Member

uLipe commented Mar 28, 2025

@MouriNaruto could you describe why the type of the blend mode is the cause of the issue above?

Thank you :)

@MouriNaruto
Copy link
Contributor Author

@MouriNaruto could you describe why the type of the blend mode is the cause of the issue above?

Thank you :)

Because MSVC will consider the enum types as int32_t (not the uint32_t you think) by default.

Kenji Mouri

@MouriNaruto
Copy link
Contributor Author

MouriNaruto commented Mar 29, 2025

image

The constant-expression must have int type and can be negative.

Reference: https://learn.microsoft.com/en-us/cpp/c-language/c-enumeration-declarations?view=msvc-170#syntax

It also seems that ISO C (until C23 because C23 can define custom integer type for enum like C++) also follows that.

image

image

https://en.cppreference.com/w/c/language/enum

Kenji Mouri

@uLipe
Copy link
Member

uLipe commented Mar 31, 2025

@MouriNaruto thanks for clarifying it.

uLipe
uLipe previously approved these changes Mar 31, 2025
@MouriNaruto
Copy link
Contributor Author

@kisvegabor @liamHowatt ping

Kenji Mouri

…ue when using lv_demo_smartwatch which compiled by MSVC
@MouriNaruto MouriNaruto force-pushed the fix_msvc_not_supported_blend_mode_issue branch from ca2daec to 27eb117 Compare April 3, 2025 12:51
@MouriNaruto
Copy link
Contributor Author

@kisvegabor @uLipe @liamHowatt Ping

Kenji Mouri

FASTSHIFT
FASTSHIFT previously approved these changes Apr 8, 2025
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
@liamHowatt liamHowatt requested a review from kisvegabor April 9, 2025 15:58
@FASTSHIFT FASTSHIFT merged commit 6eae867 into lvgl:master Apr 10, 2025
30 checks passed
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.

5 participants