Lua: fix a bug that gui.gdscreenshot() always returns a transparent image. it will always return a complete opaque image from now.

This commit is contained in:
gocha 2012-12-28 09:18:59 +00:00
parent c77f686f6b
commit 06cd0ef7f9
1 changed files with 1 additions and 1 deletions

View File

@ -3267,7 +3267,7 @@ DEFINE_LUA_FUNCTION(gui_gdscreenshot, "[whichScreen='both']")
{
for(int x = curGuiData.xMin; x < curGuiData.xMax; x++)
{
*ptr++ = 255 - Src[4*x+3];
*ptr++ = 0 /* (255 - Src[4*x+3]) / 2 */; // alpha (0-127, 0=opaque, 127=transparent)
*ptr++ = Src[4*x+2];
*ptr++ = Src[4*x+1];
*ptr++ = Src[4*x+0];