minecraft-linux / mcpelauncher-manifest

The main repository for the Linux and Mac OS Bedrock edition Minecraft launcher.
https://minecraft-linux.github.io
GNU General Public License v3.0
948 stars 99 forks source link

Touch controls on flatpak #815

Open TheKrafter opened 1 year ago

TheKrafter commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, this is the best way to play minecraft on linux phones-- except for one thing-- controls. Input with squeekboard doesnt work great (understandable) but you cannot access the pause menu, inventory, move around, or even look around well without plugging in a keyboard and mouse.

Describe the solution you'd like It'd be great to have an option in the launcher settings to launch the game with touch controls enabled (as there is no option for this in the game itself)

Describe alternatives you've considered Ive tried using squeekboard (the phosh OSK) but alas-- it didnt work.

Additional context This is the only easy and efficient way to play mc on mobile linux.

ChristopherHX commented 1 year ago

Touch input is not supported in the flatpak (glfw).

You need to install the AppImage, https://github.com/minecraft-linux/pkg or build from source.

TheKrafter commented 1 year ago

oh ok thanks!

TheKrafter commented 1 year ago

@ChristopherHX might i ask what would be required (or if its even possible) enable touch input on the flatpak?

ChristopherHX commented 1 year ago

what would be required

One of the these options must be true

Switching to eglut would kill my plans for enabling wayland + x11 again, once glfw 3.4 stabilizes

mr-sihc commented 1 year ago

raylib has touch compatabillity, and also uses glfw, maybe look at what it does

TheKrafter commented 1 year ago

also, the AppImage does not work on non-gnu systems, such as postmarketOS (Alpine-Based). so the appimage isnt even an option for me atm. though i think it could be added to the ci?

ChristopherHX commented 1 year ago

This launcher is not working with alpine libc, my experimental musl port seem to not even run at all / crash very early. The only non gnu libc, which works is the macOS libc.

alpine seem to have gnu libc compat, which may make the appimage / built from source work.

I could add the eglut mode to the flatpak as opt in, this requires the launcher to have two runtime window implementations. One with touch and another one with gamepads.

However this feature may take while as long there is no much demand from the community.

ChristopherHX commented 1 year ago

See this PR https://github.com/flathub/io.mrarm.mcpelauncher/pull/107

This is an eglut build of the flatpak and should have the exact same features as the AppImage, but doesn't require glibc installed directly in the host system due to it's own copy of it.

You can install the test build, if you also have the normal flatpak you might need to type flatpak run io.mrarm.mcpelauncher//test to start it.

TheKrafter commented 1 year ago

Thanks, That build works flawlessly on my PPP with touch controls!

Having eglut as an opt-in mode to the flatpak would probably be the best option, yes. I understand if there isn't demand for this, no worries!