Skip to content

Commit

Permalink
Match on the embark-added OpenURL event
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall authored and rib committed Sep 26, 2024
1 parent abab068 commit 5a80278
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
27 changes: 17 additions & 10 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"

[[package]]
name = "android-activity"
version = "0.5.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "052ad56e336bcc615a214bffbeca6c181ee9550acec193f0327e0b103b033a4d"
checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"
dependencies = [
"android-properties",
"bitflags 2.5.0",
Expand All @@ -153,7 +153,7 @@ dependencies = [
"log",
"ndk",
"ndk-context",
"ndk-sys",
"ndk-sys 0.6.0+11769913",
"num_enum",
"thiserror",
]
Expand Down Expand Up @@ -2455,14 +2455,14 @@ dependencies = [

[[package]]
name = "ndk"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7"
checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
dependencies = [
"bitflags 2.5.0",
"jni-sys",
"log",
"ndk-sys",
"ndk-sys 0.6.0+11769913",
"num_enum",
"raw-window-handle 0.5.2",
"raw-window-handle 0.6.0",
Expand All @@ -2484,6 +2484,15 @@ dependencies = [
"jni-sys",
]

[[package]]
name = "ndk-sys"
version = "0.6.0+11769913"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
dependencies = [
"jni-sys",
]

[[package]]
name = "nix"
version = "0.26.4"
Expand Down Expand Up @@ -4353,7 +4362,7 @@ dependencies = [
"log",
"metal",
"naga",
"ndk-sys",
"ndk-sys 0.5.0+25.2.9519653",
"objc",
"once_cell",
"parking_lot",
Expand Down Expand Up @@ -4677,8 +4686,7 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
[[package]]
name = "winit"
version = "0.29.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf"
source = "git+https://github.com/EmbarkStudios/winit?branch=embark-0.29#d03c7e392d83c1185ced4a9083f937f9ab9943e8"
dependencies = [
"ahash",
"android-activity",
Expand All @@ -4696,7 +4704,6 @@ dependencies = [
"log",
"memmap2",
"ndk",
"ndk-sys",
"objc2 0.4.1",
"once_cell",
"orbclient",
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ wgpu = { version = "0.20.0", default-features = false, features = [
] }
winit = { version = "0.29.4", default-features = false }

[patch.crates-io]
winit = { git = "https://github.com/EmbarkStudios/winit", branch = "embark-0.29" }
egui = { path = "crates/egui" }

[workspace.lints.rust]
unsafe_code = "deny"
Expand Down
4 changes: 3 additions & 1 deletion crates/egui-winit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ wayland = ["winit/wayland", "bytemuck"]
x11 = ["winit/x11", "bytemuck"]

[dependencies]
egui = { workspace = true, default-features = false, features = ["log"] }
# Note: Since we want to be able to pull in egui-winit via a `[patch.crates-io]`
# we don't use `workspace = true` here
egui = { version = "0.28", default-features = false, features = ["log"] }

ahash.workspace = true
log.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,7 @@ pub fn short_generic_event_description<T>(event: &winit::event::Event<T>) -> &'s
match event {
Event::AboutToWait => "Event::AboutToWait",
Event::LoopExiting => "Event::LoopExiting",
Event::OpenURL { .. } => "Event::OpenURL",
Event::Suspended => "Event::Suspended",
Event::Resumed => "Event::Resumed",
Event::MemoryWarning => "Event::MemoryWarning",
Expand Down

0 comments on commit 5a80278

Please sign in to comment.