diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 61a378d15..7a194de14 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -2684,7 +2684,10 @@ int CLuaInstance::CPictureNew(lua_State *L) CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *)); *udata = new CLuaPicture(); - (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency); + if (dx == 0 && dy == 0) /* NO_SCALE */ + (*udata)->cp = new CComponentsPicture(x, y, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency); + else + (*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency); (*udata)->parent = pw; luaL_getmetatable(L, "cpicture"); lua_setmetatable(L, -2); diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index f30fd285d..707850b84 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 14 +#define LUA_API_VERSION_MINOR 15 typedef std::pair fontmap_pair_t; typedef std::map fontmap_t;