mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-02-05 17:28:22 +08:00
fix display init bug, update readme
This commit is contained in:
parent
06a68e056a
commit
841c283e17
@ -415,7 +415,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;
|
||||
}
|
||||
@ -912,6 +912,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);
|
||||
}
|
||||
|
@ -131,4 +131,11 @@ Most of the demos have about 100 lines of UI code, more details [here.](https://
|
||||
## 📞Community Channel
|
||||
Thanks for the help from the community, you all make GuiLite better! And welcome to any new friend to join us.
|
||||
- [**@Twitter**](https://twitter.com/idea4good)
|
||||
- QQ code:<br>[<img src="documents/qq.group-1.jpg">](https://jq.qq.com/?_wv=1027&k=qfvGGAa7) [<img src="documents/qq.group-2.jpg">](https://jq.qq.com/?_wv=1027&k=yKnUJj1B) [<img src="documents/qq.group-3.jpg">](https://jq.qq.com/?_wv=1027&k=5hc3qwj)
|
||||
- QQ group code:
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群:527251257</b></sub></a>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群:841031761</b></sub></a>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>小群:717471210</b></sub></a>
|
||||
</tr>
|
||||
</table>
|
||||
|
10
README_zh.md
10
README_zh.md
@ -127,4 +127,12 @@
|
||||
大部分demo的UI代码只有100行左右,更多信息点[这里。](https://gitee.com/idea4good/GuiLiteSamples)
|
||||
|
||||
## 📞社区交流
|
||||
- 感谢开发者群的所有同学,是你们塑造了今天的GuiLite!也欢迎新的大神/小白加入我们。<br>[<img src="documents/qq.group-1.jpg">](https://jq.qq.com/?_wv=1027&k=qfvGGAa7) [<img src="documents/qq.group-2.jpg">](https://jq.qq.com/?_wv=1027&k=yKnUJj1B) [<img src="documents/qq.group-3.jpg">](https://jq.qq.com/?_wv=1027&k=5hc3qwj)
|
||||
- 感谢开发者群的所有同学,是你们塑造了今天的GuiLite!也欢迎新的大神/小白加入我们。
|
||||
- GuiLite开发者QQ群:
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=qfvGGAa7"><img src="documents/qq.group-1.jpg" width="240px;"/><br /><sub><b>大群:527251257</b></sub></a>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=yKnUJj1B"><img src="documents/qq.group-2.jpg" width="240px;"/><br /><sub><b>中群:841031761</b></sub></a>
|
||||
<td align="center"><a href="https://jq.qq.com/?_wv=1027&k=5hc3qwj"><img src="documents/qq.group-3.jpg" width="240px;"/><br /><sub><b>小群:717471210</b></sub></a>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user