mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Reexport winit::platform::android::activity::* in bevy_winit (#11011)
# Objective - Fixes #10630 ## Solution - Reexport winit::platform::android::activity::* in bevy_init --------- Co-authored-by: François <mockersf@gmail.com>
This commit is contained in:
parent
4852233298
commit
dc8fc6cb34
2 changed files with 4 additions and 3 deletions
|
@ -12,7 +12,7 @@ pub fn bevy_main(_attr: TokenStream, item: TokenStream) -> TokenStream {
|
|||
TokenStream::from(quote! {
|
||||
#[no_mangle]
|
||||
#[cfg(target_os = "android")]
|
||||
fn android_main(android_app: bevy::winit::AndroidApp) {
|
||||
fn android_main(android_app: bevy::winit::android_activity::AndroidApp) {
|
||||
let _ = bevy::winit::ANDROID_APP.set(android_app);
|
||||
main();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ use bevy_window::{
|
|||
use bevy_window::{PrimaryWindow, RawHandleWrapper};
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub use winit::platform::android::activity::AndroidApp;
|
||||
pub use winit::platform::android::activity as android_activity;
|
||||
|
||||
use winit::{
|
||||
event::{self, DeviceEvent, Event, StartCause, WindowEvent},
|
||||
|
@ -63,7 +63,8 @@ use crate::web_resize::{CanvasParentResizeEventChannel, CanvasParentResizePlugin
|
|||
/// [`AndroidApp`] provides an interface to query the application state as well as monitor events
|
||||
/// (for example lifecycle and input events).
|
||||
#[cfg(target_os = "android")]
|
||||
pub static ANDROID_APP: std::sync::OnceLock<AndroidApp> = std::sync::OnceLock::new();
|
||||
pub static ANDROID_APP: std::sync::OnceLock<android_activity::AndroidApp> =
|
||||
std::sync::OnceLock::new();
|
||||
|
||||
/// A [`Plugin`] that uses `winit` to create and manage windows, and receive window and input
|
||||
/// events.
|
||||
|
|
Loading…
Reference in a new issue