Sailfish Community News, 6th June 2024 - Sauna

I think love 11.4 fixes that.

I have this patch which at least makes it compile, but don’t remember how I made it:

https://build.sailfishos.org/package/view_file/home:nephros:branches:sailfishos:chum:testing:4.6-fixes/love2d/sailfish-11.4.diff?expand=1

1 Like

Ok, thanks! I’ll look at the patch!

I think it’s just a rebase of branch sailfish against upstream 11.4 but not sure.

I’m going to see if just fixing the lua_resume function signature works. Buy me some time if it does the trick (starts at 2716 in your diff).

Another remark about love in general:

You need to be running SailfishOS4.5 or later for many games.
Older versions lack some fixes in the graphics department which lead to crashes. At least that’s the case on 4.4 Xperia 10iii.

1 Like

Yeah, the lua upgrade last year complicates matters. As does: Comparing poetaster:sailfish...savegame:sailfish · poetaster/love · GitHub it looks like @sashikknox is moving away from sfos? The main gist of the compare are SDL methods for screen rotation stuff. It’s recent. Take me a while to digest.

Thank you!, I wouldn’t expect my games to be featured on the community news!
I would like to add a small clarification: boxclip is indeed playable in landscape mode, but since love2d does not have access to the device orientation on sailfish os, I developed a little trick that do the rotation based on the screen resolution. Since I can only test on my mobile which has an specific resolution, it may not work on other aspect ratios / resolutions. Any developer interested on increasing the range of devices to which this trick works feel free to join the discussion here: “Help building Native standalone LÖVE games”
Any questions, improvements or suggestions you can post it there or directly on my repository in codeberg. I’m glad for your feedback.

Thank you!

4 Likes

The comparison link I posted one before you has an orientation fix. It’s a bit long an complicated though.

I just migrated the fixes needed for SFOS 4.6 & lua 5.4 and having working builds. But, I don’t have a device with SFOS 4.6 to test yet. Anyone with a 4.6 device that can test, chum:testing contains an updated love engine that should work.

I will test the new builds, if the orientation works then there would be no need for tricks and orientation should work on all devices.

Sorry, the orientation fix is NOT in the latest builds on chum:testing. That’s just the fixes to get love building on chum (which are related to lua 5.4 and love 11.3).

got it, good then the trick works at least for 1080x2340 resolution, what the trick do is checking if resolution width is bigger or lower than 1100 pixels, if it is lower it presumes the device is in landscape orientation and rotates the screen accordingly. Any device which resolution does not fit that condition would not work, I would had to tweak it to add more devices. As said this can be discussed on the specific thread I created for love2d ports to sailfish os.

This is a problem that plagues almost all ported games. At least AFAIK the ones using SDL (which is almost everybody).

Many ports of SDL applications have applied various fixes and hacks to enable rotated, and fullscreen, views.

It would be really, really nice if upstream (i.e. Jolla-packaged) SDL could incorporate a Sailfish-specific solution out of the box, so we don’t have to have different hacks in each application.

3 Likes

Couldn’t you compare screen width against screen height so it would work on all screen resolutions?

1 Like

Yes, I could also try that. It would also help to know in which models the trick does not work, I would suggest to provide such feedback in the correspondent thread.

Rajaportin sauna!
Does it still sport the old hardcore dudes with the felt hats?

2 Likes

Yes, of course it does. :slight_smile:

2 Likes

I once went and it was so hot. Then another felt-hatted dude came in, only this one also had felt-horns on his hat. All the hardcore dudes said “ai, nyt tulee saatana” and most of them left. Why? I wondered and stayed. Not for long…

2 Likes

Hints for orientation for sfos have already been upstreamed: Support for QtWayland content orientation and window flags via SDL hints · Issue #1826 · libsdl-org/SDL · GitHub so if you use those and render in landscape swipe from bottom will be treated as sideswipe etc, there is no generic rotation trick in sdl2 as it depends on how you paint iirc, so different approaches are needed
Edit: Godot Engine port for SailfishOS - #11 by sashikknox
Since 4.4 this approach should work, what you need to rotate depends on implementation

3 Likes

Last boxclip version compares width with height and the trick should work on every device, is there any device to which it does not work feel free to leave feedback. I would be also interested to know the performance on every device since I’ve recently implemented some performance measures and the game has a nice performance tool with graphics to check.

  • Update: I’ve just submitted a new Boxclip version which features performance measure tools, feel free to share your results, it may be interesting to see how well every device performs.
1 Like

I think it’s finally time for me to make an account on these forums. I’ve been watching for years, ever since the X10IV came out and I purchased one, for SFOS to come to my device. Can’t be long now…

13 Likes