mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-24 15:58:43 -06:00
rename stuff
This commit is contained in:
parent
518b2c3e79
commit
bd299bc7a3
|
@ -51,7 +51,7 @@ winapi = { version = "0.3", features = ["wincon"] }
|
|||
default = ["raw-evt-mouse"]
|
||||
raw-evt-keyboard = [] # use raw input for keyboard. works on x11 and windows, breaks keyboard on android and wayland
|
||||
raw-evt-mouse = [] # required for mouse input
|
||||
c-ffi = [] # generate a C-ffi-compatible `kubi_main` entry point (useful if building as a shared library)
|
||||
c-ffi = [] # generate a C-ffi-compatible `kubi_extern_main` entry point (useful if building as a shared library)
|
||||
generate_visualizer_data = ["dep:serde_json", "shipyard/serde1"]
|
||||
safe_lz4 = ["lz4_flex/safe-encode", "lz4_flex/safe-decode"]
|
||||
parallel = ["shipyard/parallel"] # causes some serious issues!
|
||||
|
|
|
@ -194,17 +194,19 @@ fn attach_console() {
|
|||
pub fn android_main(app: android_activity::AndroidApp) {
|
||||
use android_activity::WindowManagerFlags;
|
||||
app.set_window_flags(WindowManagerFlags::FULLSCREEN, WindowManagerFlags::empty());
|
||||
kubi_main_impl(app);
|
||||
kubi_main(app);
|
||||
}
|
||||
|
||||
#[cfg(feature = "c-ffi")]
|
||||
#[cfg(not(target_os = "android"))]
|
||||
#[cfg(all(feature = "c-ffi", target_os = "android"))]
|
||||
compile_error!("the c-ffi feature is not supported on android");
|
||||
|
||||
#[cfg(all(feature = "c-ffi", not(target_os = "android")))]
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn kubi_main() {
|
||||
pub extern "C" fn kubi_extern_main() {
|
||||
// cant let unwinds cross the ffi boundary!
|
||||
// also, hopefully this code should never panic either...
|
||||
let panic = std::panic::catch_unwind(|| {
|
||||
kubi_main_impl();
|
||||
kubi_main();
|
||||
});
|
||||
if panic.is_err() {
|
||||
println!("!!! PANIC CAUGHT ON FFI BOUNDARY !!!");
|
||||
|
@ -212,7 +214,7 @@ pub extern "C" fn kubi_main() {
|
|||
std::mem::forget(panic); // forget the result, as dropping it will cause unwinding!
|
||||
}
|
||||
|
||||
pub fn kubi_main_impl(
|
||||
pub fn kubi_main(
|
||||
#[cfg(target_os = "android")]
|
||||
app: android_activity::AndroidApp
|
||||
) {
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
)]
|
||||
|
||||
fn main() {
|
||||
kubilib::kubi_main_impl();
|
||||
kubilib::kubi_main();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue