From 17bb8dbe6da465dca21caa9e0f8ecbdbae3bcf12 Mon Sep 17 00:00:00 2001 From: ParticleG Date: Tue, 21 Feb 2023 11:39:23 +0800 Subject: [PATCH] - Try fix iOS portrait issue --- conf.lua | 45 +++++++++++++++++++++++---------------------- parts/gameFuncs.lua | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/conf.lua b/conf.lua index 5b2d4ad0..882ed3ed 100644 --- a/conf.lua +++ b/conf.lua @@ -27,28 +27,6 @@ function love.conf(t) t.audio.mixwithsystem=true end - t.window.title="Techmino "..require "version".string - t.window.vsync=0 -- Unlimited FPS - t.window.msaa=msaa -- Multi-sampled antialiasing - t.window.depth=0 -- Bits/samp of depth buffer - t.window.stencil=1 -- Bits/samp of stencil buffer - t.window.display=1 -- Monitor ID - t.window.highdpi=true -- High-dpi mode for the window on a Retina display - t.window.x,t.window.y=nil,nil -- Position of the window - t.window.borderless=MOBILE -- Display window frame - t.window.resizable=not MOBILE -- Whether window is resizable - t.window.fullscreen=MOBILE -- Fullscreen mode - if portrait then - t.window.width,t.window.height=720,1280 - t.window.minwidth,t.window.minheight=360,640 - else - t.window.width,t.window.height=1280,720 - t.window.minwidth,t.window.minheight=640,360 - end - if fs.getInfo('media/image/icon.png') then - t.window.icon='media/image/icon.png' - end - local M=t.modules M.window,M.system,M.event,M.thread=true,true,true,true M.timer,M.math,M.data=true,true,true @@ -56,4 +34,27 @@ function love.conf(t) M.graphics,M.font,M.image=true,true,true M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true M.physics=false + + local W=t.window + W.vsync=0 -- Unlimited FPS + W.msaa=msaa -- Multi-sampled antialiasing + W.depth=0 -- Bits/samp of depth buffer + W.stencil=1 -- Bits/samp of stencil buffer + W.display=1 -- Monitor ID + W.highdpi=true -- High-dpi mode for the window on a Retina display + W.x,W.y=nil,nil -- Position of the window + W.borderless=MOBILE -- Display window frame + W.resizable=not MOBILE -- Whether window is resizable + W.fullscreen=MOBILE -- Fullscreen mode + W.title="Techmino "..require "version".string -- Window title + if portrait then + W.width,W.height=720,1280 + W.minwidth,W.minheight=360,640 + else + W.width,W.height=1280,720 + W.minwidth,W.minheight=640,360 + end + if fs.getInfo('media/image/icon.png') then + W.icon='media/image/icon.png' + end end diff --git a/parts/gameFuncs.lua b/parts/gameFuncs.lua index 103c3cb5..f13fc73c 100644 --- a/parts/gameFuncs.lua +++ b/parts/gameFuncs.lua @@ -129,7 +129,7 @@ do-- function applySettings() love.mouse.setVisible(SETTING.sysCursor) -- Apply fullscreen - love.window.setFullscreen(SETTING.fullscreen) + -- love.window.setFullscreen(SETTING.fullscreen) love.resize(GC.getWidth(),GC.getHeight()) -- Apply Zframework setting