From 1d27bfb91b0ed1b328caa80dbf8e87358f212ea4 Mon Sep 17 00:00:00 2001 From: piernov Date: Mon, 12 May 2014 13:01:00 +0200 Subject: Fix fakecanvas size --- fakecanvas.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fakecanvas.lua b/fakecanvas.lua index e5cb7b4..77466a2 100644 --- a/fakecanvas.lua +++ b/fakecanvas.lua @@ -111,8 +111,8 @@ local function Canvas (width, height) w = math.min(sw, tonumber(width) or sw) h = math.min(sh, tonumber(height) or sh) else -- well that sucks - w = math.min(prevpo2(sw), nextpo2(tonumber(width) or 1)) - h = math.min(prevpo2(sh), nextpo2(tonumber(height) or 1)) + w = math.max(prevpo2(sw), nextpo2(tonumber(width) or 1)) + h = math.max(prevpo2(sh), nextpo2(tonumber(height) or 1)) end c._imagedata = love.image.newImageData(w, h) -- cgit v1.2.3-54-g00ecf