fixed non-initialization bug for dc->gamma

pull/2/merge
HW 13 years ago
parent ade5c4892d
commit d10b73d81a

@ -86,6 +86,7 @@ static int newDrawContext(lua_State *L) {
dc->zoom = zoom;
dc->offset_x = offset_x;
dc->offset_y = offset_y;
dc->gamma = gamma;
luaL_getmetatable(L, "drawcontext");
lua_setmetatable(L, -2);

@ -159,12 +159,6 @@ function setzoom(cacheslot)
if optarg["G"] then
print("gamma correction: "..optarg["G"])
cache[cacheslot].dc:setGamma(optarg["G"])
else
-- there's still a bug in the DC initialization in C code,
-- so we disable gamma correction here explicitly
-- (it should be disabled by default)
-- TODO: correct bug in C API
cache[cacheslot].dc:setGamma(-1.0)
end
end

Loading…
Cancel
Save