Skip to content

Commit

Permalink
Fixed cast errors on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kitao committed Dec 28, 2023
1 parent 3445889 commit 2ec2ed3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions crates/pyxel-platform/src/mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ pub fn handle_mouse_motion() -> Vec<Event> {
let mut events = Vec::new();
let mut mouse_x = i32::MIN;
let mut mouse_y = i32::MIN;
#[allow(clippy::unnecessary_cast)]
if unsafe { SDL_GetWindowFlags(platform().window) } & SDL_WINDOW_INPUT_FOCUS as u32 != 0 {
if unsafe { SDL_GetWindowFlags(platform().window) } & SDL_WINDOW_INPUT_FOCUS as Uint32 != 0 {
unsafe {
SDL_GetGlobalMouseState(&mut mouse_x, &mut mouse_y);
}
Expand Down
2 changes: 1 addition & 1 deletion crates/pyxel-platform/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn set_window_size(width: u32, height: u32) {
}

pub fn is_fullscreen() -> bool {
(unsafe { SDL_GetWindowFlags(platform().window) }) & (SDL_WINDOW_FULLSCREEN as Uint32) != 0
(unsafe { SDL_GetWindowFlags(platform().window) }) & SDL_WINDOW_FULLSCREEN as Uint32 != 0
}

pub fn set_fullscreen(full: bool) {
Expand Down

0 comments on commit 2ec2ed3

Please sign in to comment.