From d2e794f112b40a44498ee867fa78cdae88c49790 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 15 Mar 2024 16:32:20 -0700 Subject: [PATCH] Fix CI desktop mode patch (#12440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective The `example-showcase` command is failing to run. ```  cargo run --release -p example-showcase -- run --screenshot --in-ci Updating crates.io index Compiling example-showcase v0.14.0-dev (/Users/robparrett/src/bevy/tools/example-showcase) Finished release [optimized] target(s) in 2.59s Running `target/release/example-showcase run --screenshot --in-ci` $ git apply --ignore-whitespace tools/example-showcase/remove-desktop-app-mode.patch error: patch failed: crates/bevy_winit/src/winit_config.rs:29 error: crates/bevy_winit/src/winit_config.rs: patch does not apply thread 'main' panicked at tools/example-showcase/src/main.rs:203:18: called `Result::unwrap()` on an `Err` value: command exited with non-zero code `git apply --ignore-whitespace tools/example-showcase/remove-desktop-app-mode.patch`: 1 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` ## Solution Update `remove-desktop-app-mode.patch`. --- tools/example-showcase/remove-desktop-app-mode.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/example-showcase/remove-desktop-app-mode.patch b/tools/example-showcase/remove-desktop-app-mode.patch index 5db7854108aab..7551ce3dc56e1 100644 --- a/tools/example-showcase/remove-desktop-app-mode.patch +++ b/tools/example-showcase/remove-desktop-app-mode.patch @@ -1,10 +1,10 @@ diff --git a/crates/bevy_winit/src/winit_config.rs b/crates/bevy_winit/src/winit_config.rs -index b91e25d34..48f19b708 100644 +index f2cb424ec..e68e01de0 100644 --- a/crates/bevy_winit/src/winit_config.rs +++ b/crates/bevy_winit/src/winit_config.rs -@@ -29,14 +29,7 @@ impl WinitSettings { - /// [`Reactive`](UpdateMode::Reactive) if windows have focus, - /// [`ReactiveLowPower`](UpdateMode::ReactiveLowPower) otherwise. +@@ -31,14 +31,7 @@ impl WinitSettings { + /// + /// Use the [`EventLoopProxy`](crate::EventLoopProxy) to request a redraw from outside bevy. pub fn desktop_app() -> Self { - WinitSettings { - focused_mode: UpdateMode::Reactive {