mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 19:31:30 +11:00
Implemented get_size() on Windows
This commit is contained in:
parent
75e985d08e
commit
822403d1ed
|
@ -243,6 +243,13 @@ unsafe extern "system" fn wnd_proc(window: winapi::HWND,
|
|||
}
|
||||
}
|
||||
|
||||
winapi::winuser::WM_SIZE => {
|
||||
let width = (lparam as u32) & 0xffff;
|
||||
let height = ((lparam as u32) >> 16) & 0xffff;
|
||||
wnd.width = width as i32;
|
||||
wnd.height = height as i32;
|
||||
}
|
||||
|
||||
winapi::winuser::WM_PAINT => {
|
||||
|
||||
// if we have nothing to draw here we return the default function
|
||||
|
@ -467,7 +474,7 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn get_size(&self) -> (usize, usize) {
|
||||
(0, 0)
|
||||
(self.width as usize, self.height as usize)
|
||||
}
|
||||
|
||||
pub fn get_mouse_pos(&self, mode: MouseMode) -> Option<(f32, f32)> {
|
||||
|
|
Loading…
Reference in a new issue