From c8133ded430cde86ca9638838ae82200f3537dda Mon Sep 17 00:00:00 2001 From: Imbris Date: Thu, 16 Jul 2020 20:14:34 -0400 Subject: [PATCH] Fix issue where client_init was not set to None after it finished, use tweaked version of winit to avoid macos link failure in the CI, small comment fixes --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- voxygen/examples/character_renderer.rs | 6 +++--- voxygen/src/menu/main/mod.rs | 1 + voxygen/src/run.rs | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da34b44b5f..7c54295dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -71,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Animals are more effective in combat - Pathfinding is much smoother and pets are cleverer - Animals run/turn at different speeds -- Updated winit 0.19 -> 0.22 +- Updated windowing library (winit 0.19 -> 0.22) ### Removed diff --git a/Cargo.lock b/Cargo.lock index 8f440b908e..8b3401d012 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4958,7 +4958,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winit" version = "0.22.2" -source = "git+https://github.com/rust-windowing/winit.git?rev=6919c2fb2d45dc4063c9ef52a69d857ed30657c7#6919c2fb2d45dc4063c9ef52a69d857ed30657c7" +source = "git+https://github.com/Imberflur/winit.git?branch=macos-test#e98133adf2abbfc4368f6c069d0beb2b8b688b42" dependencies = [ "bitflags", "cocoa 0.20.2", diff --git a/Cargo.toml b/Cargo.toml index 78adb3641e..b87d9807fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,4 +75,4 @@ debug = 1 # cpal conflict fix isn't released yet [patch.crates-io] -winit = { git = "https://github.com/rust-windowing/winit.git", rev = "6919c2fb2d45dc4063c9ef52a69d857ed30657c7" } +winit = { git = "https://github.com/Imberflur/winit.git", branch = "macos-test" } diff --git a/voxygen/examples/character_renderer.rs b/voxygen/examples/character_renderer.rs index a6d46d9b3c..70cfe2a725 100644 --- a/voxygen/examples/character_renderer.rs +++ b/voxygen/examples/character_renderer.rs @@ -1,7 +1,7 @@ -// TODO: fix this example when we switch to actively maintained renderering -// backend Right now we would have to update `gfx_window_glutin` to work with +// TODO: Fix this example when we switch to actively maintained rendering +// backend. Right now we would have to update `gfx_window_glutin` to work with // the latest version of glutin or we would need to add headless support to -// `old_school_gfx_glutin_ext` +// `old_school_gfx_glutin_ext`. fn main() { println!("Example temporarily disabled, see the TODO comment for details"); diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 24735fd95a..e520df7ecf 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -65,6 +65,7 @@ impl PlayState for MainMenuState { // Poll client creation. match self.client_init.as_ref().and_then(|init| init.poll()) { Some(InitMsg::Done(Ok(mut client))) => { + self.client_init = None; self.main_menu_ui.connected(); // Register voxygen components / resources crate::ecs::init(client.state_mut().ecs_mut()); diff --git a/voxygen/src/run.rs b/voxygen/src/run.rs index 65501fcbe3..b4f8856e17 100644 --- a/voxygen/src/run.rs +++ b/voxygen/src/run.rs @@ -16,7 +16,7 @@ pub fn run(mut global_state: GlobalState, event_loop: EventLoop) { debug!(?current_state, "Started game with state"); }); - // Used to ignore every other `MainEvenstCleared` + // Used to ignore every other `MainEventsCleared` // This is a workaround for a bug on macos in which mouse motion events are only // reported every other cycle of the event loop // See: https://github.com/rust-windowing/winit/issues/1418