mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Implement MonitorId::get_dimensions for Android (#400)
This commit is contained in:
parent
9b5254adeb
commit
ff17eff00f
|
@ -1,5 +1,7 @@
|
|||
# Unreleased
|
||||
|
||||
- Implement `MonitorId::get_dimensions` for Android.
|
||||
|
||||
# Version 0.10.1 (2018-02-05)
|
||||
|
||||
- Added method `os::macos::WindowBuilderExt::with_movable_by_window_background(bool)` that allows to move a window without a titlebar - `with_decorations(false)`
|
||||
|
|
|
@ -161,7 +161,10 @@ impl MonitorId {
|
|||
|
||||
#[inline]
|
||||
pub fn get_dimensions(&self) -> (u32, u32) {
|
||||
unimplemented!()
|
||||
unsafe {
|
||||
let window = android_glue::get_native_window();
|
||||
(ffi::ANativeWindow_getWidth(window) as u32, ffi::ANativeWindow_getHeight(window) as u32)
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue