mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2026-01-02 04:17:19 +08:00
fix display init bug, update readme
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
int snap_shot(const char* file_name)
|
||||
{
|
||||
if (!m_phy_fb)
|
||||
if (!m_phy_fb || (m_color_bytes !=2 && m_color_bytes != 4))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -605,6 +605,7 @@ inline c_display::c_display(void* phy_fb, int display_width, int display_height,
|
||||
|
||||
inline c_display::c_display(void* phy_fb, int display_width, int display_height, c_surface* surface) : m_width(display_width), m_height(display_height), m_phy_fb(phy_fb), m_phy_read_index(0), m_phy_write_index(0), m_surface_cnt(1), m_surface_index(0)
|
||||
{
|
||||
m_color_bytes = surface->m_color_bytes;
|
||||
surface->m_is_active = true;
|
||||
(m_surface_group[0] = surface)->attach_display(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user