diff --git a/voxygen/egui/src/lib.rs b/voxygen/egui/src/lib.rs index babd81bf41..62c05dd08c 100644 --- a/voxygen/egui/src/lib.rs +++ b/voxygen/egui/src/lib.rs @@ -15,6 +15,7 @@ use egui::{ use egui_winit_platform::Platform; #[cfg(feature = "use-dyn-lib")] use lazy_static::lazy_static; +#[cfg(feature = "use-dyn-lib")] use std::ffi::CStr; #[cfg(feature = "use-dyn-lib")] use std::sync::Arc; diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index 8ffdbe8151..fbccd795df 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -19,6 +19,7 @@ use common::{ clock::Clock, }; use std::panic; +#[cfg(feature = "hot-anim")] use std::sync::Arc; use tracing::{error, info, warn}; use veloren_voxygen::ui::egui::EguiState; diff --git a/voxygen/src/render/renderer/drawer.rs b/voxygen/src/render/renderer/drawer.rs index eea548097f..f7a0b18207 100644 --- a/voxygen/src/render/renderer/drawer.rs +++ b/voxygen/src/render/renderer/drawer.rs @@ -266,16 +266,10 @@ impl<'frame> Drawer<'frame> { } } - pub fn draw_egui( - &mut self, - platform: &mut Platform, - scale_factor: f32, - ) { + pub fn draw_egui(&mut self, platform: &mut Platform, scale_factor: f32) { let (_output, paint_commands) = platform.end_frame(); - let paint_jobs = platform - .context() - .tessellate(paint_commands); + let paint_jobs = platform.context().tessellate(paint_commands); let screen_descriptor = ScreenDescriptor { physical_width: self.borrow.sc_desc.width, @@ -300,7 +294,9 @@ impl<'frame> Drawer<'frame> { self.borrow.egui_render_pass.execute( &mut self.encoder.as_mut().unwrap(), - &self.swap_tex.view, + self.taking_screenshot + .as_ref() + .map_or(&self.swap_tex.view, |s| s.texture_view()), &paint_jobs, &screen_descriptor, None, diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index deaa8929d5..e72590f769 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -14,6 +14,7 @@ use serde::{Deserialize, Serialize}; use tracing::{error, warn}; use vek::*; use winit::monitor::VideoMode; + /// Represents a key that the game recognises after input mapping. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)] pub enum GameInput {