Skip to content

Commit

Permalink
Fix panic when using FullScreenExclusive::ApplicationControlled (#2579
Browse files Browse the repository at this point in the history
)
  • Loading branch information
marc0246 authored Oct 16, 2024
1 parent 52fc88a commit 8c08a85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vulkano/src/swapchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ impl Swapchain {
Self::new_inner_unchecked(&self.device, &self.surface, &create_info, Some(self))?
};

let (mut swapchain, swapchain_images) = Self::from_handle(
let (swapchain, swapchain_images) = Self::from_handle(
self.device.clone(),
handle,
image_handles,
Expand All @@ -500,10 +500,10 @@ impl Swapchain {
)?;

if self.full_screen_exclusive == FullScreenExclusive::ApplicationControlled {
Arc::get_mut(&mut swapchain)
.unwrap()
.full_screen_exclusive_held =
AtomicBool::new(self.full_screen_exclusive_held.load(Ordering::Relaxed))
swapchain.full_screen_exclusive_held.store(
self.full_screen_exclusive_held.load(Ordering::Relaxed),
Ordering::Relaxed,
);
};

Ok((swapchain, swapchain_images))
Expand Down

0 comments on commit 8c08a85

Please sign in to comment.