diff --git a/android-activity/Cargo.toml b/android-activity/Cargo.toml index d49e968..a2e013e 100644 --- a/android-activity/Cargo.toml +++ b/android-activity/Cargo.toml @@ -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" diff --git a/android-activity/src/game_activity/mod.rs b/android-activity/src/game_activity/mod.rs index 6cd4fed..d217939 100644 --- a/android-activity/src/game_activity/mod.rs +++ b/android-activity/src/game_activity/mod.rs @@ -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()); } } diff --git a/android-activity/src/native_activity/mod.rs b/android-activity/src/native_activity/mod.rs index c4f1cee..e00e25a 100644 --- a/android-activity/src/native_activity/mod.rs +++ b/android-activity/src/native_activity/mod.rs @@ -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()); } }