Techmino icon indicating copy to clipboard operation
Techmino copied to clipboard

Deactivating portrait mode does nothing on iOS

Open C29H25N3O5 opened this issue 3 years ago • 21 comments

Even when I had portrait mode deactivated in settings the game still starts with portrait mode. The only way to enter landscape mode is to open the game with the device in landscape mode already.

C29H25N3O5 avatar Feb 05 '23 08:02 C29H25N3O5

Actually, I found it can only launch in portrait mode on iOS 16 when you holding the phone vertically.

but in the same scene, it will launch in landscape mode on iOS 15.

CleanShot 2023-02-19 at 20 22 05@2x

But I tried search things on repos of SDL2 and love2d, didn't found anything

maybe this commit fixed this issue: https://github.com/libsdl-org/SDL/commit/70656b133c89c614422130b6c7e0a52cdccc6d4f#diff-de1e3f37ab58f8229cf963eff7070fde81645400705c9f34aff43d9a84af9418

bytemain avatar Feb 19 '23 12:02 bytemain

When I tried to use a simple demo to reproduce, it just behaves good both on iOS 15 and iOS 16.

CleanShot 2023-02-19 at 20 41 32@2x

ios related source code are the same.

getWidth and getHeight return right value on demo, but error value in Techmino

CleanShot 2023-02-19 at 20 46 23@2x

CleanShot 2023-02-19 at 20 48 19@2x

bytemain avatar Feb 19 '23 12:02 bytemain

Actually, I found it can only launch in portrait mode on iOS 16 when you holding the phone vertically.

but in the same scene, it will launch in landscape mode on iOS 15.

CleanShot 2023-02-19 at 20 22 05@2x

But I tried search things on repos of SDL2 and love2d, didn't found anything

maybe this commit fixed this issue: libsdl-org/SDL@70656b1#diff-de1e3f37ab58f8229cf963eff7070fde81645400705c9f34aff43d9a84af9418

What's your love2d revision? Techmino iOS uses c35356c, see here

ParticleG avatar Feb 21 '23 01:02 ParticleG

not relevant with the version of love2d I'm using, if you download from the App Store then you will meet the same problem.

bytemain avatar Feb 21 '23 03:02 bytemain

not relevant with the version of love2d I'm using, if you download from the App Store then you will meet the same problem.

It seems this issue love-android #196 happens on iOS16 again. You can try these configs in love.conf():

t.window.width,t.window.height=1280,720
t.window.fullscreen=true
t.window.resizeable=false

ParticleG avatar Feb 21 '23 06:02 ParticleG

This should be temporarily fixed by removing the W.fullscreen config in conf.lua #862

ParticleG avatar Feb 21 '23 07:02 ParticleG

CleanShot 2023-02-21 at 15 11 29@2x

tested ci-ios-test branch, works well.

bytemain avatar Feb 21 '23 07:02 bytemain

CleanShot 2023-02-21 at 15 11 29@2x

tested ci-ios-test branch, works well.

Could you test these configs on your simple demo? We currently don't have a mac to simulate iOS 15 devices.

not relevant with the version of love2d I'm using, if you download from the App Store then you will meet the same problem.

It seems this issue love-android #196 happens on iOS16 again. You can try these configs in love.conf():

t.window.width,t.window.height=1280,720
t.window.fullscreen=true
t.window.resizeable=false

ParticleG avatar Feb 21 '23 07:02 ParticleG

These configs should make your demo launch in landscape mode on iOS 15, but in portrait mode on iOS 16

ParticleG avatar Feb 21 '23 07:02 ParticleG

Ok, I will try it now.

bytemain avatar Feb 21 '23 07:02 bytemain

CleanShot 2023-02-21 at 15 47 45@2x

both launched in landscape mode

CleanShot 2023-02-21 at 15 48 36@2x

bytemain avatar Feb 21 '23 07:02 bytemain

That's weird...

ParticleG avatar Feb 21 '23 07:02 ParticleG

But ci-ios-test branch actually worked, and works on my real device(ios 16.3) too.

bytemain avatar Feb 21 '23 08:02 bytemain

https://gist.github.com/bytemain/0e4e93e4cc195c9c744518583005fc4b

demo which I used for testing

bytemain avatar Feb 21 '23 08:02 bytemain

image In Techmino's conf.lua, this would cause portrait on iOS 16. I'll try your main.lua

ParticleG avatar Feb 21 '23 08:02 ParticleG

https://gist.github.com/bytemain/0e4e93e4cc195c9c744518583005fc4b

demo which I used for testing

You haven't tried using conf.lua? Wiki said it woudn't work if defined in main.lua.

image

Try newest code in ci-ios-test, it would cause demo launch in portrait mode on iOS 16. It uses a conf.lua with demo main.lua

ParticleG avatar Feb 21 '23 09:02 ParticleG

oh I forget it, let me try again

bytemain avatar Feb 21 '23 09:02 bytemain

0605DCFD-473A-48E2-96B7-9148A13B2F83 This is newest build on ci-ios-test

ParticleG avatar Feb 21 '23 09:02 ParticleG

CleanShot 2023-02-21 at 17 19 58@2x

You are right.

bytemain avatar Feb 21 '23 09:02 bytemain

Okay, fullscreen config affects orientation again. so this should be an upstream issue of Love, I'll report an issue to them

ParticleG avatar Feb 21 '23 09:02 ParticleG

`da code

Frequency Incremental

Update!!!

Hz Meter: 0 Hz

 

Menu.

Notice: It Got Improved. So Don't Mess The Code.

`

RubixYouTube avatar Mar 01 '23 05:03 RubixYouTube