fix android build errors

This commit is contained in:
lixianjing 2019-11-13 14:18:43 +08:00
parent e8c6d8a7a4
commit caccc79b3a
3 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,11 @@
# 最新动态
* 2019/11/13
* 把部分变量修改为常量,以减少内存使用。
* 更新IDL修复脚本绑定的问题。
* 增加ICON_AT_BOTTOM的处理感谢朝泽提供补丁
* 修改android编译问题感谢智明提供补丁
* 2019/11/12
* 修复了vg旋转显示bug和修改了贴图兼容性感谢智明提供补丁
* digit clock 移到widgets目录。

View File

@ -88,7 +88,7 @@ static ret_t date_time_get_now_impl(date_time_t* dt) {
static ret_t date_time_set_now_impl(date_time_t* dt) {
struct tm tms;
time_t t = 0;
struct timeval tv;
memset(&tms, 0x00, sizeof(tms));
tms.tm_year = dt->year - 1900;
@ -100,7 +100,9 @@ static ret_t date_time_set_now_impl(date_time_t* dt) {
t = mktime(&tms);
#ifdef LINUX
if (stime(&t) != 0) {
tv.tv_sec = t;
tv.tv_usec = 0;
if (settimeofday(&tv, (struct timezone*)0) < 0) {
perror("stime failed\n");
return RET_FAIL;
}

View File

@ -31,7 +31,10 @@
#define NANOVG_GLES3_IMPLEMENTATION
#endif
#ifndef WITHOUT_GLAD
#ifdef WITHOUT_GLAD
#include <SDL_opengl.h>
#include <SDL_opengl_glext.h>
#else
#include "glad/glad.h"
#endif /*WITHOUT_GLAD*/