From 31dcfbcc985b8dee087545647fc824a076ee3894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=96R=C3=96K=20Attila?= Date: Wed, 7 Aug 2024 13:08:16 +0200 Subject: [PATCH] core,desktop: Update to `winit` `v0.30.2` and latest `egui` from git --- Cargo.lock | 322 +++++++++++++++++++++------------- Cargo.toml | 2 +- core/Cargo.toml | 2 +- desktop/Cargo.toml | 8 +- desktop/src/app.rs | 13 +- desktop/src/gui/controller.rs | 10 +- desktop/src/util.rs | 22 +-- 7 files changed, 232 insertions(+), 147 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76401ed79143d..a409c8c0b225f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,9 +84,9 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", "bitflags 2.6.0", @@ -96,9 +96,9 @@ dependencies = [ "jni-sys", "libc", "log", - "ndk", + "ndk 0.9.0", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -205,7 +205,7 @@ checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" dependencies = [ "clipboard-win", "log", - "objc2 0.5.2", + "objc2", "objc2-app-kit", "objc2-foundation", "parking_lot", @@ -522,32 +522,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - -[[package]] -name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys", - "objc2 0.4.1", -] - [[package]] name = "block2" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2 0.5.2", + "objc2", ] [[package]] @@ -1053,7 +1034,7 @@ dependencies = [ "js-sys", "libc", "mach2", - "ndk", + "ndk 0.8.0", "ndk-context", "oboe", "wasm-bindgen", @@ -1428,10 +1409,16 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" + [[package]] name = "ecolor" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "bytemuck", "emath", @@ -1440,7 +1427,7 @@ dependencies = [ [[package]] name = "egui" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "ahash", "emath", @@ -1452,7 +1439,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "ahash", "bytemuck", @@ -1462,7 +1449,7 @@ dependencies = [ "log", "thiserror", "type-map", - "web-time 0.2.4", + "web-time", "wgpu", "winit", ] @@ -1470,7 +1457,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "ahash", "arboard", @@ -1478,7 +1465,7 @@ dependencies = [ "log", "raw-window-handle", "smithay-clipboard", - "web-time 0.2.4", + "web-time", "webbrowser", "winit", ] @@ -1486,7 +1473,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "ahash", "egui", @@ -1504,7 +1491,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emath" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "bytemuck", ] @@ -1633,18 +1620,24 @@ dependencies = [ [[package]] name = "epaint" version = "0.28.1" -source = "git+https://github.com/emilk/egui.git?rev=37b1e1504db14697c39ce1c3bb5e58f4f2b819bf#37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" dependencies = [ "ab_glyph", "ahash", "bytemuck", "ecolor", "emath", + "epaint_default_fonts", "log", "nohash-hasher", "parking_lot", ] +[[package]] +name = "epaint_default_fonts" +version = "0.28.1" +source = "git+https://github.com/emilk/egui.git?rev=2dac4a4fc6f5fedd42665834991b19115b62088e#2dac4a4fc6f5fedd42665834991b19115b62088e" + [[package]] name = "equivalent" version = "1.0.1" @@ -2532,17 +2525,6 @@ dependencies = [ "cc", ] -[[package]] -name = "icrate" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" -dependencies = [ - "block2 0.3.0", - "dispatch", - "objc2 0.4.1", -] - [[package]] name = "id3" version = "1.14.0" @@ -3220,7 +3202,21 @@ dependencies = [ "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.6.0", + "jni-sys", + "log", + "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", "thiserror", @@ -3241,6 +3237,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 = "nellymoser-rs" version = "0.1.2" @@ -3451,16 +3456,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -[[package]] -name = "objc2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" -dependencies = [ - "objc-sys", - "objc2-encode 3.0.0", -] - [[package]] name = "objc2" version = "0.5.2" @@ -3468,7 +3463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", - "objc2-encode 4.0.3", + "objc2-encode", ] [[package]] @@ -3478,15 +3473,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", + "block2", "libc", - "objc2 0.5.2", + "objc2", "objc2-core-data", "objc2-core-image", "objc2-foundation", "objc2-quartz-core", ] +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -3494,8 +3513,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", ] @@ -3505,17 +3524,23 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", "objc2-metal", ] [[package]] -name = "objc2-encode" -version = "3.0.0" +name = "objc2-core-location" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] [[package]] name = "objc2-encode" @@ -3530,9 +3555,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", + "block2", + "dispatch", "libc", - "objc2 0.5.2", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", ] [[package]] @@ -3542,8 +3580,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", ] @@ -3554,12 +3592,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", + "block2", + "objc2", "objc2-foundation", "objc2-metal", ] +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + [[package]] name = "objc_id" version = "0.1.1" @@ -3585,7 +3678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" dependencies = [ "jni", - "ndk", + "ndk 0.8.0", "ndk-context", "num-derive", "num-traits", @@ -3902,9 +3995,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "6f24d770aeca0eacb81ac29dfbc55ebcc09312fdd1f8bbecdc7e4a84e000e3b4" dependencies = [ "memchr", ] @@ -4045,15 +4138,6 @@ dependencies = [ "rustfft", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4313,7 +4397,7 @@ dependencies = [ "url", "wasm-bindgen-futures", "weak-table", - "web-time 1.1.0", + "web-time", ] [[package]] @@ -4785,9 +4869,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +checksum = "7555fcb4f753d095d734fdefebb0ad8c98478a21db500492d87c55913d3b0086" dependencies = [ "ab_glyph", "log", @@ -6040,9 +6124,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e9e6b6d4a2bb4e7e69433e0b35c7923b95d4dc8503a84d25ec917a4bbfdf07" +checksum = "f90e11ce2ca99c97b940ee83edbae9da2d56a08f9ea8158550fd77fa31722993" dependencies = [ "cc", "downcast-rs", @@ -6054,9 +6138,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.3" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e63801c85358a431f986cffa74ba9599ff571fc5774ac113ed3b490c19a1133" +checksum = "7e321577a0a165911bdcfb39cf029302479d7527b517ee58ab0f6ad09edf0943" dependencies = [ "bitflags 2.6.0", "rustix", @@ -6126,20 +6210,20 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.2" +version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67da50b9f80159dec0ea4c11c13e24ef9e7574bd6ce24b01860a175010cea565" +checksum = "d7b56f89937f1cf2ee1f1259cf2936a17a1f45d8f0aa1019fae6d470d304cfa6" dependencies = [ "proc-macro2", - "quick-xml 0.31.0", + "quick-xml 0.34.0", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.2" +version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "105b1842da6554f91526c14a2a2172897b7f745a805d62af4ce698706be79c12" +checksum = "43676fe2daf68754ecf1d72026e4e6c15483198b5d24e888b74d3f22f887a148" dependencies = [ "dlib", "log", @@ -6163,16 +6247,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "web-time" version = "1.1.0" @@ -6189,13 +6263,13 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "425ba64c1e13b1c6e8c5d2541c8fac10022ca584f33da781db01b5756aef1f4e" dependencies = [ - "block2 0.5.1", + "block2", "core-foundation", "home", "jni", "log", "ndk-context", - "objc2 0.5.2", + "objc2", "objc2-foundation", "url", "web-sys", @@ -6294,7 +6368,7 @@ dependencies = [ "log", "metal", "naga", - "ndk-sys", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot", @@ -6636,37 +6710,41 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winit" -version = "0.29.15" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" +checksum = "1dc930d6cfbf53c4fe0b95689cdc2e17b8658c3f4214b9953298ccb5a1a15c90" dependencies = [ "ahash", "android-activity", "atomic-waker", "bitflags 2.6.0", + "block2", "bytemuck", "calloop", - "cfg_aliases 0.1.1", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation", "core-graphics", "cursor-icon", - "icrate", + "dpi", "js-sys", "libc", - "log", "memmap2", - "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", + "ndk 0.9.0", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix", "sctk-adwaita", "smithay-client-toolkit", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", @@ -6675,8 +6753,8 @@ dependencies = [ "wayland-protocols", "wayland-protocols-plasma", "web-sys", - "web-time 0.2.4", - "windows-sys 0.48.0", + "web-time", + "windows-sys 0.52.0", "x11-dl", "x11rb", "xkbcommon-dl", diff --git a/Cargo.toml b/Cargo.toml index 97e6ff77cc553..1ed3974f3e216 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } naga = { version = "22.1.0", features = ["wgsl-out"] } wgpu = "22.1.0" -egui = { git = "https://github.com/emilk/egui.git", rev = "37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" } +egui = { git = "https://github.com/emilk/egui.git", rev = "2dac4a4fc6f5fedd42665834991b19115b62088e" } clap = { version = "4.5.13", features = ["derive"] } anyhow = "1.0" slotmap = "1.0.7" diff --git a/core/Cargo.toml b/core/Cargo.toml index e23043fee08e1..7fee4a5ca41ae 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -55,7 +55,7 @@ hashbrown = { version = "0.14.5", features = ["raw"] } scopeguard = "1.2.0" fluent-templates = "0.9.4" egui = { workspace = true, optional = true } -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "37b1e1504db14697c39ce1c3bb5e58f4f2b819bf", default-features = false, optional = true } +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "2dac4a4fc6f5fedd42665834991b19115b62088e", default-features = false, optional = true } png = { version = "0.17.13", optional = true } flv-rs = { path = "../flv" } async-channel = { workspace = true } diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index 40c5e0e63e8d8..adfb5bfe10013 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -14,10 +14,10 @@ workspace = true clap = { workspace = true } cpal = "0.15.3" egui = { workspace = true } -egui_extras = { git = "https://github.com/emilk/egui.git", rev = "37b1e1504db14697c39ce1c3bb5e58f4f2b819bf", default-features = false, features = ["image"] } -egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "37b1e1504db14697c39ce1c3bb5e58f4f2b819bf", features = ["winit"] } +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "2dac4a4fc6f5fedd42665834991b19115b62088e", default-features = false, features = ["image"] } +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "2dac4a4fc6f5fedd42665834991b19115b62088e", features = ["winit"] } image = { workspace = true, features = ["png"] } -egui-winit = { git = "https://github.com/emilk/egui.git", rev = "37b1e1504db14697c39ce1c3bb5e58f4f2b819bf" } +egui-winit = { git = "https://github.com/emilk/egui.git", rev = "2dac4a4fc6f5fedd42665834991b19115b62088e" } fontdb = "0.20" ruffle_core = { path = "../core", features = ["audio", "clap", "mp3", "nellymoser", "default_compatibility_rules", "egui"] } ruffle_render = { path = "../render", features = ["clap"] } @@ -28,7 +28,7 @@ ruffle_frontend_utils = { path = "../frontend-utils" } tracing = { workspace = true } tracing-subscriber = { workspace = true } tracing-appender = "0.2.3" -winit = "0.29.15" +winit = "0.30.2" webbrowser = "1.0.1" url = { workspace = true } dirs = "5.0" diff --git a/desktop/src/app.rs b/desktop/src/app.rs index 754cc10631ccc..67816baab3acb 100644 --- a/desktop/src/app.rs +++ b/desktop/src/app.rs @@ -17,9 +17,9 @@ use std::time::{Duration, Instant}; use url::Url; use winit::dpi::{LogicalSize, PhysicalPosition, PhysicalSize, Size}; use winit::event::{ElementState, KeyEvent, Modifiers, WindowEvent}; -use winit::event_loop::{ControlFlow, EventLoop, EventLoopBuilder}; +use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop}; use winit::keyboard::{Key, NamedKey}; -use winit::window::{Fullscreen, Icon, Window, WindowBuilder}; +use winit::window::{Fullscreen, Icon, Window, WindowAttributes}; pub struct App { preferences: GlobalPreferences, @@ -43,7 +43,7 @@ impl App { let icon = Icon::from_rgba(icon_bytes.to_vec(), 32, 32).context("Couldn't load app icon")?; - let event_loop = EventLoopBuilder::with_user_event().build()?; + let event_loop = EventLoop::with_user_event().build()?; let no_gui = preferences.cli.no_gui; let min_window_size = (16, if no_gui { 16 } else { MENU_HEIGHT + 16 }).into(); @@ -52,13 +52,14 @@ impl App { let preferred_height = preferences.cli.height; let start_fullscreen = preferences.cli.fullscreen; - let window = WindowBuilder::new() + let window_attributes = WindowAttributes::default() .with_visible(false) .with_title("Ruffle") .with_window_icon(Some(icon)) .with_min_inner_size(min_window_size) - .with_max_inner_size(max_window_size) - .build(&event_loop)?; + .with_max_inner_size(max_window_size); + + let window = event_loop.create_window(window_attributes)?; let window = Arc::new(window); let mut font_database = fontdb::Database::default(); diff --git a/desktop/src/gui/controller.rs b/desktop/src/gui/controller.rs index 8696f501cf2c1..bcfc33a42b70f 100644 --- a/desktop/src/gui/controller.rs +++ b/desktop/src/gui/controller.rs @@ -97,8 +97,14 @@ impl GuiController { let theme_controller = ThemeController::new(window.clone(), preferences.clone(), egui_ctx.clone()).await; - let mut egui_winit = - egui_winit::State::new(egui_ctx, ViewportId::ROOT, window.as_ref(), None, None); + let mut egui_winit = egui_winit::State::new( + egui_ctx, + ViewportId::ROOT, + window.as_ref(), + None, + None, + None, + ); egui_winit.set_max_texture_side(descriptors.limits.max_texture_dimension_2d as usize); let movie_view_renderer = Arc::new(MovieViewRenderer::new( diff --git a/desktop/src/util.rs b/desktop/src/util.rs index 47bf0eb67ada1..56cc5dc74ee5f 100644 --- a/desktop/src/util.rs +++ b/desktop/src/util.rs @@ -7,7 +7,7 @@ use std::path::{Path, PathBuf}; use url::Url; use winit::dpi::PhysicalSize; use winit::event::{KeyEvent, Modifiers}; -use winit::event_loop::EventLoop; +use winit::event_loop::{ActiveEventLoop, EventLoop}; use winit::keyboard::{Key, KeyLocation, NamedKey}; /// Converts a winit event to a Ruffle `TextControlCode`. @@ -211,16 +211,16 @@ pub fn get_screen_size(event_loop: &EventLoop) -> PhysicalSize let mut min_y = 0; let mut max_x = 0; let mut max_y = 0; - - for monitor in event_loop.available_monitors() { - let size = monitor.size(); - let position = monitor.position(); - min_x = min_x.min(position.x); - min_y = min_y.min(position.y); - max_x = max_x.max(position.x + size.width as i32); - max_y = max_y.max(position.y + size.height as i32); - } - + /* + for monitor in event_loop.available_monitors() { + let size = monitor.size(); + let position = monitor.position(); + min_x = min_x.min(position.x); + min_y = min_y.min(position.y); + max_x = max_x.max(position.x + size.width as i32); + max_y = max_y.max(position.y + size.height as i32); + } + */ let width = max_x - min_x; let height = max_y - min_y;