Add flag to emulate mobile during preview
Since the is_mobile check was moved to compile-time instead of runtime
in 0a6a441041, we need a way to override
the check when previewing using the 'mobile' flag.
Signed-off-by: kernelkind <kernelkind@gmail.com>
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
f9d6161500
commit
aacc41e4c2
@@ -38,7 +38,13 @@ pub fn padding<R>(
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[allow(unreachable_code)]
|
||||
pub fn is_mobile(_ctx: &egui::Context) -> bool {
|
||||
#[cfg(feature = "emulate_mobile")]
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
{
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user