main.c
#include <stdio.h> #include <stdlib.h> #include <SDL.h> int main(int argc, char **argv) { uint32_t cnt = 0; SDL_Surface *screen = NULL; uint32_t col[] = {0xf800, 0x7e0, 0x001f}; SDL_Init(SDL_INIT_VIDEO); screen = SDL_SetVideoMode(320, 240, 16, SDL_SWSURFACE | SDL_DOUBLEBUF); while (cnt < 600) { cnt += 1; SDL_FillRect(screen, &screen->clip_rect, col[cnt % 3]); SDL_Flip(screen); SDL_Delay(1000 / 60); } SDL_Quit(); return 0; }
updater
#!/bin/sh dir=`dirname $0` cd $dir killall updateui killall keymon LD_LIBRARY_PATH=/usr/trimui/lib ./main
編譯
$ arm-linux-gnueabi-gcc main.c -o main -I/usr/include/SDL /xxx/usr/trimui/lib/libSDL-1.2.so.0
P.S. libSDL-1.2.so.0是從機器複製出來的
打包
$ zip TrimuiUpdateV9999_tearing.zip updater main
刷入TrimuiUpdateV9999_tearing.zip就可以測試閃屏問題,可以看出目前TRIMUI(trimui_model_S_dark_V0.105_en.img)還是存在閃屏問題