Skip to content

Commit

Permalink
Merge pull request Rust-SDL2#1364 from nathanvoglsam/fix-android-disp…
Browse files Browse the repository at this point in the history
…lay-handle

Fix compile error when building for android in raw_display_handle implementation
  • Loading branch information
Cobrand authored Jan 18, 2024
2 parents f2f1e29 + e4e4d1e commit b654517
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/sdl2/raw_window_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ unsafe impl HasRawDisplayHandle for Window {
SDL_SYSWM_WINDOWS | SDL_SYSWM_WINRT => {
use self::raw_window_handle::WindowsDisplayHandle;

let mut handle = WindowsDisplayHandle::empty();
let handle = WindowsDisplayHandle::empty();

RawDisplayHandle::Windows(handle)
}
Expand Down Expand Up @@ -200,17 +200,15 @@ unsafe impl HasRawDisplayHandle for Window {
SDL_SYSWM_UIKIT => {
use self::raw_window_handle::UiKitDisplayHandle;

let mut handle = UiKitDisplayHandle::empty();
let handle = UiKitDisplayHandle::empty();

RawDisplayHandle::UiKit(handle)
}
#[cfg(any(target_os = "android"))]
SDL_SYSWM_ANDROID => {
use self::raw_window_handle::AndroidDisplayHandle;

let mut handle = AndroidDisplayHandle::empty();
handle.a_native_window =
unsafe { wm_info.info.android }.window as *mut libc::c_void;
let handle = AndroidDisplayHandle::empty();

RawDisplayHandle::Android(handle)
}
Expand Down

0 comments on commit b654517

Please sign in to comment.