Skip to content

Commit 86700c3

Browse files
committed
Enable direct mode
1 parent 35cc0b7 commit 86700c3

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

display.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ void init_disp_drv(
9090
// Set the Horizontal and Vertical Resolution
9191
disp_drv->hor_res = hor_res;
9292
disp_drv->ver_res = ver_res;
93+
94+
// Use screen-sized buffers and draw to absolute coordinates
95+
disp_drv->direct_mode = 1;
9396
}
9497

9598
/****************************************************************************

feature-phone.wasm

87 Bytes
Binary file not shown.

feature-phone.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ fn createButton() void {
188188
const btn = c.lv_btn_create(c.lv_scr_act());
189189
_ = c.lv_obj_add_event_cb(btn, eventHandler, c.LV_EVENT_ALL, null);
190190
c.lv_obj_align(btn, c.LV_ALIGN_CENTER, 0, 40);
191+
c.lv_obj_add_flag(btn, c.LV_OBJ_FLAG_CHECKABLE);
191192

192193
const label = c.lv_label_create(btn);
193194
c.lv_label_set_text(label, "Button");

lvglwasm.wasm

16 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)