mod: simulate full screen update in SDL emulator

pull/2/merge
Qingping Hou 12 years ago
parent a15d5fb3b8
commit a24fca5b5c

@ -150,6 +150,16 @@ static int einkUpdate(lua_State *L) {
ioctl(fb->fd, FBIO_EINK_UPDATE_DISPLAY_AREA, &myarea);
#else
// for now, we only do fullscreen blits in emulation mode
if (fxtype == 0) {
// simmulate a full screen update in eink screen
if(SDL_MUSTLOCK(fb->screen) && (SDL_LockSurface(fb->screen) < 0)) {
return luaL_error(L, "can't lock surface.");
}
SDL_FillRect(fb->screen, NULL, 0x000000);
if(SDL_MUSTLOCK(fb->screen)) SDL_UnlockSurface(fb->screen);
SDL_Flip(fb->screen);
}
if(SDL_MUSTLOCK(fb->screen) && (SDL_LockSurface(fb->screen) < 0)) {
return luaL_error(L, "can't lock surface.");
}

Loading…
Cancel
Save