From be60c7c1d5775124aa664e1b928c120c76b43623 Mon Sep 17 00:00:00 2001 From: Adrian Castro <22133246+castdrian@users.noreply.github.com> Date: Sat, 1 Aug 2026 14:37:18 +0200 Subject: [PATCH] fix(ios): present voxel pipeline canvases --- src/render/Pipelines.lua | 2 +- src/render/Renderer.lua | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/render/Pipelines.lua b/src/render/Pipelines.lua index 1aa579ab..d4ad618e 100644 --- a/src/render/Pipelines.lua +++ b/src/render/Pipelines.lua @@ -120,7 +120,7 @@ end -- shape (love.graphics.newCanvas), so accept either and nothing else. local function isCanvas(v) if type(v) == "userdata" then - return type(v.typeOf) == "function" and v:typeOf("Canvas") == true + return type(v.getWidth) == "function" and type(v.getHeight) == "function" end if type(v) == "table" then return type(v.getWidth) == "function" and type(v.getHeight) == "function" diff --git a/src/render/Renderer.lua b/src/render/Renderer.lua index 5c4ee919..48d2fa5b 100644 --- a/src/render/Renderer.lua +++ b/src/render/Renderer.lua @@ -32,7 +32,7 @@ Renderer.MAX_UI_HEIGHT = 576 -- would otherwise take the frame down with it. local function isCanvas(v) if type(v) == "userdata" then - return type(v.typeOf) == "function" and v:typeOf("Canvas") == true + return type(v.getWidth) == "function" and type(v.getHeight) == "function" end if type(v) == "table" then return type(v.getWidth) == "function" and type(v.getHeight) == "function" @@ -602,7 +602,11 @@ function Renderer:endFrame(zones, worldZones) -- runs, so dialogs, menus and the HUD sit on top as usual. love.graphics.setColor(1, 1, 1, 1) love.graphics.setScissor(0, 0, ww, wh) - love.graphics.draw(self.worldOverride, 0, 0, 0, 1 / dpiX, 1 / dpiY) + if love.system and love.system.getOS and love.system.getOS() == "iOS" then + love.graphics.draw(self.worldOverride, 0, wh, 0, 1 / dpiX, -1 / dpiY) + else + love.graphics.draw(self.worldOverride, 0, 0, 0, 1 / dpiX, 1 / dpiY) + end love.graphics.setScissor() -- the screen-space overlays the flat path draws over its composite local fade = self.worldFadeAlpha