aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2014-05-12 13:01:00 +0200
committerpiernov <piernov@piernov.org>2014-05-12 13:01:00 +0200
commit1d27bfb91b0ed1b328caa80dbf8e87358f212ea4 (patch)
tree0cd41e48e3bb07f62402f55e5c87575869697a4c
parent1fe07b8aace16fc3b4d933d16333de2bad7a0d11 (diff)
downloadlove2d-fakecanvas-1d27bfb91b0ed1b328caa80dbf8e87358f212ea4.tar.gz
love2d-fakecanvas-1d27bfb91b0ed1b328caa80dbf8e87358f212ea4.tar.bz2
love2d-fakecanvas-1d27bfb91b0ed1b328caa80dbf8e87358f212ea4.tar.xz
love2d-fakecanvas-1d27bfb91b0ed1b328caa80dbf8e87358f212ea4.zip
Fix fakecanvas sizeHEADmaster
-rw-r--r--fakecanvas.lua4
1 files 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)