Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ pub struct Platform {
// for most purposes they are the same so we just use class name for simplicity
// https://unix.stackexchange.com/questions/494169/
pub linux_wm_class: &'static str,

/// Whether to automatically setup the panic hook for Android.
/// Set this to false if your app does its own panic_hook setup to avoid conflicts.
pub android_panic_hook: bool,
}

impl Default for Platform {
Expand All @@ -183,6 +187,7 @@ impl Default for Platform {
framebuffer_alpha: false,
wayland_decorations: WaylandDecorations::default(),
linux_wm_class: "miniquad-application",
android_panic_hook: true,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/native/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ pub unsafe fn run<F>(conf: crate::conf::Conf, f: F)
where
F: 'static + FnOnce() -> Box<dyn EventHandler>,
{
{
if conf.platform.android_panic_hook {
use std::ffi::CString;
use std::panic;

Expand Down
Loading