lvgl / lv_web_emscripten

LVGL ported to Emscripten to be converted to JavaScript
MIT License
73 stars 27 forks source link

Upsize of Windows to 800x480 #3

Closed maxpromer closed 4 years ago

maxpromer commented 4 years ago

Hello, i want to up size of windows from 480x320 to 800x480 so i edit lv_conf.h to

/* Maximal horizontal and vertical resolution to support by the library.*/
#define LV_HOR_RES_MAX          (800)
#define LV_VER_RES_MAX          (480)

and main.c to

    /*Create a display*/
    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);            /*Basic initialization*/
    disp_drv.hor_res = 800;
    disp_drv.ver_res = 480;
    disp_drv.buffer = &disp_buf1;
    disp_drv.flush_cb = monitor_flush;    /*Used when `LV_VDB_SIZE != 0` in lv_conf.h (buffered drawing)*/
    disp1 = lv_disp_drv_register(&disp_drv);

and then i have error here

98dbc525878c5a868ff3590f589b4261.png

what i do wrong ?

Thanks.

embeddedt commented 4 years ago

I'll look into it soon. I'm not sure why this is happening. I assume it works if you don't change the resolution?

maxpromer commented 4 years ago

I'll look into it soon. I'm not sure why this is happening. I assume it works if you don't change the resolution?

Yes, it work great. if me not change everything.

embeddedt commented 4 years ago

All you need to do is change LV_HOR_RES_MAX and LV_VER_RES_MAX in lv_conf.h to the appropriate size you want. There is no need to change anything in main.c.

Please clone the latest version of this repository and try again (be sure to update submodules).

maxpromer commented 4 years ago

All you need to do is change LV_HOR_RES_MAX and LV_VER_RES_MAX in lv_conf.h to the appropriate size you want. There is no need to change anything in main.c.

Please clone the latest version of this repository and try again (be sure to update submodules).

It work, Thank so much !