Giter VIP home page Giter VIP logo

Comments (5)

MikuAuahDark avatar MikuAuahDark commented on June 15, 2024

I seem unable to reproduce this behavior in LOVE 12 with "embed" mode.

main.lua

function love.draw()
	local x, y, w, h = love.window.getSafeArea()
	love.graphics.setLineWidth(20)
	love.graphics.rectangle("line", x, y, w, h)
	love.graphics.print(string.format("%dx%d+%d+%d\n%s", x, y, w, h, love.window.getDisplayOrientation()), 100, 100)
end

conf.lua

function love.conf(t)
	t.window.resizable = false
	t.window.fullscreen = false
end

from love.

FloridaMen avatar FloridaMen commented on June 15, 2024

here's my conf.lua

function love.conf(t)
    t.console = false
    t.accelerometerjoystick = false
    t.window.highdpi = true
    t.window.width = 2
    t.window.height = 1
    t.window.resizable = false
end 

I'll try and use the example you gave, perhaps the issue is with my phone's specific implementation of auto-rotate?? I don't really know what I'm talking about though, honestly

from love.

FloridaMen avatar FloridaMen commented on June 15, 2024

I just noticed you were using t.window.resizalbe = true. Does this stop the app from rotating? Because if that's the case then the issue is in the wiki:

If set to true this allows the user to resize the game's window. In version 11.4 and later for Android, this also allows changing orientation between landscape and portrait.

Personally I take this to mean that if set to false, it should prevent changing orientation between landscape and portrait, but perhaps I'm interpreting this incorrectly.

from love.

MikuAuahDark avatar MikuAuahDark commented on June 15, 2024

Oh yeah, the code I pasted was wrong because I was testing if t.window.resizable = true does what it expects. t.window.resizable = false should lock orientation while keeping the aspect ratio (can only rotate in landscale), while t.window.resizable = true allows it to go from landscape to portrait.

Still, with my original testing, I can't reproduce the issue. I'll take a look at your provided conf.lua tomorrow.

from love.

FloridaMen avatar FloridaMen commented on June 15, 2024

Just tested the following configs to see if highdpi or fullscreen had an effect (none of them functioned as intended for me):

function love.conf(t)
    t.console = false
    t.accelerometerjoystick = false
    t.window.highdpi = true
    t.window.width = 2
    t.window.height = 1
    t.window.resizable = false
    t.window.fullscreen = false
end 
function love.conf(t)
    t.console = false
    t.accelerometerjoystick = false
    t.window.highdpi = false
    t.window.width = 2
    t.window.height = 1
    t.window.resizable = false
    t.window.fullscreen = false
end
function love.conf(t)
    t.console = false
    t.accelerometerjoystick = false
    t.window.highdpi = true
    t.window.width = 2
    t.window.height = 1
    t.window.resizable = true
    t.window.fullscreen = true
end 

from love.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.