Fix important bug where resizing an image or using any transformation resets transparent color to zero

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1610 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-09-12 14:58:25 +00:00
parent 79dbd3722a
commit c53c6415c3
2 changed files with 12 additions and 3 deletions

View File

@@ -340,7 +340,10 @@ int L_GetBackupPixel(lua_State* L)
lua_pushinteger(L, Main_backups->Pages->Transparent_color);
return 1;
}
lua_pushinteger(L, Read_pixel_from_backup_screen(x,y));
// Can't use Read_pixel_from_backup_screen(), because in a Lua script
// the "backup" can use a different screen dimension.
lua_pushinteger(L, *(Screen_backup + x + Main_backups->Pages->Next->Width * y));
return 1;
}