mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-26 21:58:20 -06:00
check at runtime
This commit is contained in:
parent
f33d1589b3
commit
3159273495
|
@ -9,7 +9,9 @@ pub fn update_cursor_lock_state(
|
||||||
lock: UniqueView<CursorLock>,
|
lock: UniqueView<CursorLock>,
|
||||||
display: NonSendSync<UniqueView<Renderer>>
|
display: NonSendSync<UniqueView<Renderer>>
|
||||||
) {
|
) {
|
||||||
#[cfg(not(target_os = "android"))] {
|
if cfg!(target_os = "android") {
|
||||||
|
return
|
||||||
|
}
|
||||||
if lock.is_inserted_or_modified() {
|
if lock.is_inserted_or_modified() {
|
||||||
let gl_window = display.display.gl_window();
|
let gl_window = display.display.gl_window();
|
||||||
let window = gl_window.window();
|
let window = gl_window.window();
|
||||||
|
@ -19,7 +21,6 @@ pub fn update_cursor_lock_state(
|
||||||
}).expect("Failed to change cursor grab state");
|
}).expect("Failed to change cursor grab state");
|
||||||
window.set_cursor_visible(!lock.0);
|
window.set_cursor_visible(!lock.0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert_lock_state(
|
pub fn insert_lock_state(
|
||||||
|
|
|
@ -120,6 +120,9 @@ pub fn draw_current_chunk_border(
|
||||||
camera: View<Camera>,
|
camera: View<Camera>,
|
||||||
settings: UniqueView<GameSettings>,
|
settings: UniqueView<GameSettings>,
|
||||||
) {
|
) {
|
||||||
|
if cfg!(target_os = "android") {
|
||||||
|
return
|
||||||
|
}
|
||||||
if !settings.debug_draw_current_chunk_border {
|
if !settings.debug_draw_current_chunk_border {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl Default for GameSettings {
|
||||||
max_anisotropy: Some(16),
|
max_anisotropy: Some(16),
|
||||||
render_distance: 6,
|
render_distance: 6,
|
||||||
mouse_sensitivity: 1.,
|
mouse_sensitivity: 1.,
|
||||||
debug_draw_current_chunk_border: cfg!(debug_assertions),
|
debug_draw_current_chunk_border: cfg!(not(target_os = "android")) && cfg!(debug_assertions),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue