diff options
Diffstat (limited to 'scripts/style_api_gen.py')
-rwxr-xr-x | scripts/style_api_gen.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py index 308389555..5060b93a4 100755 --- a/scripts/style_api_gen.py +++ b/scripts/style_api_gen.py @@ -390,10 +390,7 @@ def style_set(p): cast = style_set_cast(p['style_type']) print("static inline void lv_style_set_" + p['name'].lower() +"(lv_style_t * style, "+ p['var_type'] +" value)") print("{") - print(" lv_style_value_t v = {") - print(" ." + p['style_type'] +" = " + cast + "value") - print(" };") - print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", v);") + print(" lv_style_set_prop(style, LV_STYLE_" + p['name'] +", *((lv_style_value_t*)&value));") print("}") print("") |