Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FenrirWolf committed Feb 17, 2024
1 parent d6f22dc commit f715fc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ctru-rs/src/applets/swkbd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ bitflags! {
}
}

// Internal book-keeping struct used to send data to `aptSetMessageCallback` when calling the software keyboard
// Internal book-keeping struct used to send data to `aptSetMessageCallback` when calling the software keyboard.
// We only need this because libctru doesn't keep a pointer to the shared memory block in `SwkbdExtra` for whatever reason
struct MessageCallbackData {
extra: *mut SwkbdExtra,
swkbd_shared_mem_ptr: *mut libc::c_void,
Expand Down Expand Up @@ -855,8 +856,7 @@ impl SoftwareKeyboard {
}

// A reimplementation of `swkbdMessageCallback` from `libctru/source/applets/swkbd.c`.
// This is only needed because the original function is private to libctru, so we can't
// simply reuse their version
// This function sets up and then calls the callback set by `swkbdSetFilterCallback`
#[deny(unsafe_op_in_unsafe_fn)]
unsafe extern "C" fn swkbd_message_callback(
user: *mut libc::c_void,
Expand Down

0 comments on commit f715fc6

Please sign in to comment.