Enable WASI feature, enhance security and add SGX sample (#142)
Change emcc to clang Refine interpreter to improve perforamnce
This commit is contained in:
@ -22,7 +22,7 @@ char label_count1_str[11] = { 0 };
|
||||
void timer1_update(user_timer_t timer1)
|
||||
{
|
||||
if ((count % 100) == 0) {
|
||||
sprintf(count_str, "%d", count / 100);
|
||||
snprintf(count_str, sizeof(count_str), "%d", count / 100);
|
||||
wgl_label_set_text(count_label, count_str);
|
||||
}
|
||||
++count;
|
||||
@ -63,7 +63,8 @@ static void btn_event_cb(wgl_obj_t btn, wgl_event_t event)
|
||||
{
|
||||
if(event == WGL_EVENT_RELEASED) {
|
||||
label_count1_value++;
|
||||
sprintf(label_count1_str, "%d", label_count1_value);
|
||||
snprintf(label_count1_str, sizeof(label_count1_str),
|
||||
"%d", label_count1_value);
|
||||
wgl_label_set_text(label_count1, label_count1_str);
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ char label_count1_str[11] = { 0 };
|
||||
void timer1_update(user_timer_t timer1)
|
||||
{
|
||||
if ((count % 100) == 0) {
|
||||
sprintf(count_str, "%d", count / 100);
|
||||
snprintf(count_str, sizeof(count_str), "%d", count / 100);
|
||||
lv_label_set_text(count_label, count_str);
|
||||
}
|
||||
++count;
|
||||
@ -65,7 +65,8 @@ static void btn_event_cb(lv_obj_t *btn, lv_event_t event)
|
||||
{
|
||||
if(event == LV_EVENT_RELEASED) {
|
||||
label_count1_value--;
|
||||
sprintf(label_count1_str, "%d", label_count1_value);
|
||||
snprintf(label_count1_str, sizeof(label_count1_str),
|
||||
"%d", label_count1_value);
|
||||
lv_label_set_text(label_count1, label_count1_str);
|
||||
if (label_count1_value == 0)
|
||||
label_count1_value = 100;
|
||||
|
||||
Reference in New Issue
Block a user