Add android support#330
Conversation
|
I just checked that sdl2 is only used for gamepad controlling - maybe it's easier to replace it with Update: No, gilrs doesn't support android -_- |
We could do this: fishsticks = { version = "0.2.0", default-features = false, features = ["gilrs"] }However, this will require some refactoring due to regression: Also, Edit: Just saw the update on your message. I guess the answer is no 😄 |
|
@orhun Funny, but I already fixed those errors and got the following error: 01-18 22:03:25.556 12026 12069 E SAPP : PanicInfo { payload: Any { .. }, message: Some(called `Result::unwrap()` on an `Err` value: "Gilrs does not support current platform."), location: Location { file: "src/_mainCgin7I", line: 125, col: 65 } }
01-18 22:03:27.085 12026 12026 I SAPP : NativeActivity onFocusChange() |
|
Definitely interesting... 🤔 Maybe it is worth reporting to upstream? Either way, if it's not supported then it is not supported. 🤷🏼 |
|
It looks like the menu items are gone. I assume nothing happens when you click on the area, right? |
Do you know if the game freezes/locks up when this happens? Seems to me like it has issues with building the menu and it is probably connected to input (menus use gamepad input for navigation), after transition to gilrs. I implemented the menu builder and the menu elements, so if you need any assistance to integrate them with gilrs, give me a shout |
|
Due to the #466 Bevy Rewrite this work is defunct, but the contribution is recognized and remains appreciated! 🙏 |

This draft pull request is a quick try to add android support to FishFight. Currently, blocked by the following error:
Also, as a temporary workaround, I changed
assets dirin main.rs as I couldn't fastly setASSETS_DIR_ENV_VAR.To reproduce this error - you will need to build
sdl2(this helped me) from source with this command:ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-18(if you are on m1 mac - see this), and placelibs/arm64-v8a/libSDL2.soin yourtarget/aarch64-linux-android/<PROFILE>/tools/libSDL2.so. Then install crossbundle (or cargo-quad-apk, I think it will work too right now) and runcrossbundle run android --quad.Currently, crashing on this stage:

@erlend-sh 👋