minor changes...

This commit is contained in:
Alex Janka 2023-10-27 09:42:14 +11:00
parent ea11f04336
commit cd34578e97

View file

@ -86,7 +86,6 @@ impl Editor for Emulator {
#[cfg(feature = "vulkan")] #[cfg(feature = "vulkan")]
shader_path, shader_path,
) )
.0
}, },
); );
Box::new(Self::new( Box::new(Self::new(
@ -127,7 +126,7 @@ impl EmulatorWindow {
manager: Arc<Mutex<Option<Arc<RendererBackendManager>>>>, manager: Arc<Mutex<Option<Arc<RendererBackendManager>>>>,
size: Size, size: Size,
#[cfg(feature = "vulkan")] shader_path: Option<std::path::PathBuf>, #[cfg(feature = "vulkan")] shader_path: Option<std::path::PathBuf>,
) -> (Self, Arc<RendererBackendManager>) { ) -> Self {
let current_resolution = ResolutionData { let current_resolution = ResolutionData {
real_width: size.width as u32, real_width: size.width as u32,
real_height: size.height as u32, real_height: size.height as u32,
@ -154,17 +153,14 @@ impl EmulatorWindow {
let renderer = RendererBackend::new(current_resolution, window, window_options, m.clone()); let renderer = RendererBackend::new(current_resolution, window, window_options, m.clone());
( Self {
Self { renderer,
renderer, manager: m.clone(),
manager: m.clone(), emu_comms,
emu_comms, joypad_state: Default::default(),
joypad_state: Default::default(), latest_buf: Vec::new(),
latest_buf: Vec::new(), current_resolution,
current_resolution, }
},
m.clone(),
)
} }
fn process_events(&mut self) { fn process_events(&mut self) {
@ -239,7 +235,7 @@ impl WindowHandler for EmulatorWindow {
), ),
) { ) {
Ok(_) => {} Ok(_) => {}
Err(e) => println!("error sending joypad update: {e:#?}"), Err(e) => nih_error!("error sending joypad update: {e:#?}"),
} }
} }
} }