Skip to content

Commit

Permalink
native_activity: Fix clippy lints around NativeActivityGlue not `Se…
Browse files Browse the repository at this point in the history
…ndSync` and unwritted `redraw_needed` field
  • Loading branch information
MarijnS95 committed Jul 29, 2024
1 parent 2ac3a7b commit 3623169
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions android-activity/src/native_activity/glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ pub enum State {

#[derive(Debug)]
pub struct WaitableNativeActivityState {
// TODO: Unnecessary NIHism: why not use ndk::NativeActivity?
pub activity: *mut ndk_sys::ANativeActivity,

pub mutex: Mutex<NativeActivityState>,
pub cond: Condvar,
}

unsafe impl Send for WaitableNativeActivityState {}
unsafe impl Sync for WaitableNativeActivityState {}

#[derive(Debug, Clone)]
pub struct NativeActivityGlue {
pub inner: Arc<WaitableNativeActivityState>,
}
unsafe impl Send for NativeActivityGlue {}
unsafe impl Sync for NativeActivityGlue {}

impl Deref for NativeActivityGlue {
type Target = WaitableNativeActivityState;
Expand Down Expand Up @@ -223,7 +225,6 @@ pub struct NativeActivityState {
/// Set as soon as the Java main thread notifies us of an
/// `onDestroyed` callback.
pub destroyed: bool,
pub redraw_needed: bool,
pub pending_input_queue: *mut ndk_sys::AInputQueue,
pub pending_window: Option<NativeWindow>,
}
Expand Down Expand Up @@ -370,7 +371,6 @@ impl WaitableNativeActivityState {
thread_state: NativeThreadState::Init,
app_has_saved_state: false,
destroyed: false,
redraw_needed: false,
pending_input_queue: ptr::null_mut(),
pending_window: None,
}),
Expand Down

0 comments on commit 3623169

Please sign in to comment.