mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-17 03:58:54 +00:00
7cdb77eca4
The callback given to `AndroidApp::input_events()` is now expected to return `InputStatus::Handled` or `InputStatus::Unhandled`. When running with NativeActivity then if we know an input event hasn't been handled we can notify the InputQueue which may result in fallback handling. Although the status is currently ignored with the GameActivity backend. Since this is a breaking change that also affects the current Winit backend this updates the winit based examples to stick with the 0.3 release of android-activity for now. Fixes: #31
73 lines
2.4 KiB
TOML
73 lines
2.4 KiB
TOML
[package]
|
|
name = "agdk-eframe"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
resolver = "2"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
log = "0.4"
|
|
winit = "0.27.2"
|
|
wgpu = "0.13.0"
|
|
pollster = "0.2"
|
|
egui = "0.19"
|
|
eframe = { version = "0.19", features = [ "wgpu" ] }
|
|
egui_demo_lib = "0.19"
|
|
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
|
env_logger = "0.9"
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_logger = "0.11.0"
|
|
android-activity = { version = "0.3", features = [ "game-activity" ] }
|
|
|
|
[patch.crates-io]
|
|
|
|
# This branch of Winit has an updated Android backend based on android-activity
|
|
# Note: The winit branches are current misnamed:
|
|
# - "android-activity" is based on Winit 0.27 (required for Egui compatibility)
|
|
# - "android-activity-0.27" is based on Winit master
|
|
# The -0.27 branch is currently associated with a pull request so we'll just
|
|
# stick with these names for now
|
|
winit = { git = "https://github.com/rib/winit", branch = "android-activity" }
|
|
#winit = { path = "../../../winit" }
|
|
|
|
# Note:
|
|
# Since android-activity is responsible for invoking the `android_main`
|
|
# entrypoint for a native Rust application there can only be a single
|
|
# implementation of the crate linked with the application.
|
|
#
|
|
# By default the Winit-based examples use released versions of android-activity
|
|
# to help keep the version in sync with the Winit backend.
|
|
#
|
|
# If you'd like to build this example against the local checkout of
|
|
# android-activity you should specify a patch here to make sure you also affect
|
|
# the version that Winit uses.
|
|
#
|
|
# Note: also check that the local android-activity/Cargo.toml version matches
|
|
# the android-activity version that Winit depends on (in case you need to check
|
|
# out a release branch locally to be compatible)
|
|
#android-activity = { path = "../../android-activity" }
|
|
|
|
# Egui 0.19 is missing some fixes for Android so we need to build against
|
|
# git master for now
|
|
egui = { git = "https://github.com/emilk/egui" }
|
|
eframe = { git = "https://github.com/emilk/egui" }
|
|
egui_demo_lib = { git = "https://github.com/emilk/egui" }
|
|
#egui = { path = "../../../egui/crates/egui" }
|
|
#eframe = { path = "../../../egui/crates/eframe" }
|
|
#egui_demo_lib = { path = "../../../egui/crates/egui_demo_lib" }
|
|
|
|
[features]
|
|
default = []
|
|
desktop = []
|
|
|
|
[lib]
|
|
name="main"
|
|
crate_type=["cdylib"]
|
|
|
|
[[bin]]
|
|
path="src/lib.rs"
|
|
name="agdk-eframe"
|
|
required-features = [ "desktop" ] |