mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-12 17:48:55 +00:00
Update to ndk 0.7 and ndk-sys 0.4
This commit is contained in:
@@ -24,11 +24,9 @@ native-activity = []
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
jni-sys = "0.3"
|
||||
# Coordinate the next winit release with android-ndk-rs: https://github.com/rust-windowing/winit/issues/1995
|
||||
ndk = { git = "https://github.com/rust-windowing/android-ndk-rs", rev = "7e33384" }
|
||||
ndk-sys = { git = "https://github.com/rust-windowing/android-ndk-rs", rev = "7e33384" }
|
||||
#ndk-sys = { version = "0.3" }
|
||||
ndk-context = { version = "0.1" }
|
||||
ndk = "0.7"
|
||||
ndk-sys = "0.4"
|
||||
ndk-context = "0.1"
|
||||
android-properties = "0.2"
|
||||
num_enum = "0.5"
|
||||
bitflags = "1.3"
|
||||
|
||||
@@ -500,14 +500,14 @@ pub unsafe extern "C" fn GameActivity_onCreate(
|
||||
|
||||
fn android_log(level: Level, tag: &CStr, msg: &CStr) {
|
||||
let prio = match level {
|
||||
Level::Error => ndk_sys::android_LogPriority_ANDROID_LOG_ERROR,
|
||||
Level::Warn => ndk_sys::android_LogPriority_ANDROID_LOG_WARN,
|
||||
Level::Info => ndk_sys::android_LogPriority_ANDROID_LOG_INFO,
|
||||
Level::Debug => ndk_sys::android_LogPriority_ANDROID_LOG_DEBUG,
|
||||
Level::Trace => ndk_sys::android_LogPriority_ANDROID_LOG_VERBOSE,
|
||||
Level::Error => ndk_sys::android_LogPriority::ANDROID_LOG_ERROR,
|
||||
Level::Warn => ndk_sys::android_LogPriority::ANDROID_LOG_WARN,
|
||||
Level::Info => ndk_sys::android_LogPriority::ANDROID_LOG_INFO,
|
||||
Level::Debug => ndk_sys::android_LogPriority::ANDROID_LOG_DEBUG,
|
||||
Level::Trace => ndk_sys::android_LogPriority::ANDROID_LOG_VERBOSE,
|
||||
};
|
||||
unsafe {
|
||||
ndk_sys::__android_log_write(prio as raw::c_int, tag.as_ptr(), msg.as_ptr());
|
||||
ndk_sys::__android_log_write(prio.0 as raw::c_int, tag.as_ptr(), msg.as_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -418,14 +418,14 @@ unsafe extern "C" fn ANativeActivity_onCreate(
|
||||
|
||||
fn android_log(level: Level, tag: &CStr, msg: &CStr) {
|
||||
let prio = match level {
|
||||
Level::Error => ndk_sys::android_LogPriority_ANDROID_LOG_ERROR,
|
||||
Level::Warn => ndk_sys::android_LogPriority_ANDROID_LOG_WARN,
|
||||
Level::Info => ndk_sys::android_LogPriority_ANDROID_LOG_INFO,
|
||||
Level::Debug => ndk_sys::android_LogPriority_ANDROID_LOG_DEBUG,
|
||||
Level::Trace => ndk_sys::android_LogPriority_ANDROID_LOG_VERBOSE,
|
||||
Level::Error => ndk_sys::android_LogPriority::ANDROID_LOG_ERROR,
|
||||
Level::Warn => ndk_sys::android_LogPriority::ANDROID_LOG_WARN,
|
||||
Level::Info => ndk_sys::android_LogPriority::ANDROID_LOG_INFO,
|
||||
Level::Debug => ndk_sys::android_LogPriority::ANDROID_LOG_DEBUG,
|
||||
Level::Trace => ndk_sys::android_LogPriority::ANDROID_LOG_VERBOSE,
|
||||
};
|
||||
unsafe {
|
||||
ndk_sys::__android_log_write(prio as raw::c_int, tag.as_ptr(), msg.as_ptr());
|
||||
ndk_sys::__android_log_write(prio.0 as raw::c_int, tag.as_ptr(), msg.as_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user