/// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`].
/// Guest Mii's won't be available regardless of their allowlist/blocklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`].
/// Look into [`MiiSelector::set_options()`] to see how to work with options.
/// Look into [`MiiSelector::set_options()`] to see how to work with options.
///
///
/// # Example
/// # Example
@ -151,12 +151,12 @@ impl MiiSelector {
/// use ctru::applets::mii_selector::{Index, MiiSelector};
/// use ctru::applets::mii_selector::{Index, MiiSelector};
/// Guest Mii's won't be available regardless of their whitelist/blacklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`].
/// Guest Mii's won't be available regardless of their allowlist/blocklist state if the [`MiiSelector`] is run without setting [`Options::ENABLE_GUESTS`].
/// Look into [`MiiSelector::set_options()`] to see how to work with options.
/// Look into [`MiiSelector::set_options()`] to see how to work with options.
///
///
/// # Example
/// # Example
@ -180,12 +180,12 @@ impl MiiSelector {
/// use ctru::applets::mii_selector::{Index, MiiSelector};
/// use ctru::applets::mii_selector::{Index, MiiSelector};
/// let mut mii_selector = MiiSelector::new();
/// let mut mii_selector = MiiSelector::new();
///
///
/// // Blacklist the guest Mii at index 1 so that it cannot be selected.
/// // Blocklist the guest Mii at index 1 so that it cannot be selected.
/// Returns a [`RawFrameBuffer`] for the screen (if the framebuffer was allocated on the HEAP).
///
///
/// Note that the pointer of the framebuffer returned by this function can
/// # Notes
/// change after each call to this function if double buffering is enabled.
///
/// The pointer of the framebuffer returned by this function can change after each call
/// to this function if double buffering is enabled, so it's suggested to NOT save it for later use.
///
/// # Panics
///
/// If the [`Gfx`] service was initialised via [`Gfx::with_formats_vram()`] this function will crash the program with an ARM exception.
#[doc(alias = "gfxGetFramebuffer")]
#[doc(alias = "gfxGetFramebuffer")]
fnraw_framebuffer(&mutself)-> RawFrameBuffer{
fnraw_framebuffer(&mutself)-> RawFrameBuffer{
letmutwidth: u16=0;
letmutwidth: u16=0;
@ -244,14 +250,15 @@ pub struct Gfx {
_service_handler: ServiceReference,
_service_handler: ServiceReference,
}
}
staticGFX_ACTIVE: Mutex<usize>=Mutex::new(0);
staticGFX_ACTIVE: Mutex<()>=Mutex::new(());
implGfx{
implGfx{
/// Initialize a new default service handle.
/// Initialize a new default service handle.
///
///
/// # Notes
/// # Notes
///
///
/// It's the same as calling:
/// The new `Gfx` instance will allocate the needed framebuffers in the CPU-GPU shared memory region (to ensure compatibiltiy with all possible uses of the `Gfx` service).
/// As such, it's the same as calling:
///
///
/// ```
/// ```
/// # let _runner = test_runner::GdbRunner::default();
/// # let _runner = test_runner::GdbRunner::default();
@ -261,12 +268,14 @@ impl Gfx {
/// # use ctru::services::gfx::Gfx;
/// # use ctru::services::gfx::Gfx;
/// # use ctru::services::gspgpu::FramebufferFormat;
/// # use ctru::services::gspgpu::FramebufferFormat;
//! The HID service provides read access to user input such as [button presses](Hid::keys_down), [touch screen presses](Hid::touch_position),
//! The HID service provides read access to user input such as [button presses](Hid::keys_down), [touch screen presses](Hid::touch_position),
//! and [circle pad information](Hid::circlepad_position). It also provides information from the sound volume slider, the accelerometer, and the gyroscope.
//! and [circle pad information](Hid::circlepad_position). It also provides information from the [volume slider](Hid::volume_slider()),
// TODO: Implement volume slider, accelerometer and gyroscope + any other missing functionality.
//! the [accelerometer](Hid::accelerometer_vector()), and the [gyroscope](Hid::gyroscope_rate()).
#![doc(alias = "input")]
#![doc(alias = "input")]
#![doc(alias = "controller")]
#![doc(alias = "controller")]
#![doc(alias = "gamepad")]
#![doc(alias = "gamepad")]
usestd::sync::Mutex;
usecrate::error::ResultCode;
usecrate::error::ResultCode;
usecrate::services::ServiceReference;
usebitflags::bitflags;
usebitflags::bitflags;
staticHID_ACTIVE: Mutex<()>=Mutex::new(());
bitflags!{
bitflags!{
/// A set of flags corresponding to the button and directional pad inputs present on the 3DS.
/// A set of flags corresponding to the button and directional pad inputs present on the 3DS.