Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyAnkh committed Oct 18, 2022
1 parent b08d6fc commit 27e1eb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions crates/bevy_render/src/view/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn extract_windows(
.entry(window.id())
.or_insert(ExtractedWindow {
id: window.id(),
handle: window.raw_handle(),
raw_handle: window.raw_handle(),
physical_width: new_width,
physical_height: new_height,
present_mode: window.present_mode(),
Expand Down Expand Up @@ -165,16 +165,15 @@ pub fn prepare_windows(
.windows
.values_mut()
// value of raw_winndow_handle only None if synthetic test
.filter(|x| x.raw_window_handle.is_some())
.filter(|x| x.raw_handle.is_some())
{
let window_surfaces = window_surfaces.deref_mut();
let surface = window_surfaces
.surfaces
.entry(window.id)
.or_insert_with(|| unsafe {
// NOTE: On some OSes this MUST be called from the main thread.
render_instance
.create_surface(&window.raw_window_handle.as_ref().unwrap().get_handle())
render_instance.create_surface(&window.raw_handle.as_ref().unwrap().get_handle())
});

let swap_chain_descriptor = wgpu::SurfaceConfiguration {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl Window {
cursor_grab_mode: window_descriptor.cursor_grab_mode,
cursor_icon: CursorIcon::Default,
physical_cursor_position: None,
raw_handle: raw_handle.map(RawHandleWrapper::new),
raw_handle,
focused: true,
mode: window_descriptor.mode,
canvas: window_descriptor.canvas.clone(),
Expand Down

0 comments on commit 27e1eb2

Please sign in to comment.