Browse Source

Fixed romfs suggestions

pull/134/head
Andrea Ciliberti 1 year ago
parent
commit
869cd50d06
  1. 2
      ctru-rs/src/applets/swkbd.rs
  2. 4
      ctru-rs/src/services/am.rs
  3. 2
      ctru-rs/src/services/cam.rs
  4. 2
      ctru-rs/src/services/cfgu.rs
  5. 2
      ctru-rs/src/services/fs.rs
  6. 2
      ctru-rs/src/services/gfx.rs
  7. 6
      ctru-rs/src/services/hid.rs
  8. 2
      ctru-rs/src/services/ndsp/mod.rs
  9. 10
      ctru-rs/src/services/romfs.rs
  10. 4
      ctru-rs/src/services/soc.rs

2
ctru-rs/src/applets/swkbd.rs

@ -3,7 +3,7 @@
//! This applet opens a virtual keyboard on the console's bottom screen which lets the user write UTF-16 valid text. //! This applet opens a virtual keyboard on the console's bottom screen which lets the user write UTF-16 valid text.
// TODO: Implement remaining functionality (password mode, filter callbacks, etc.). Also improve "max text length" API. Improve `number of buttons` API when creating a new SoftwareKeyboard. // TODO: Implement remaining functionality (password mode, filter callbacks, etc.). Also improve "max text length" API. Improve `number of buttons` API when creating a new SoftwareKeyboard.
// TODO: Split the Parental PIN lock operations into a different type. // TODO: Split the Parental PIN lock operations into a different type.
#[doc(alias = "keyboard")] #![doc(alias = "keyboard")]
use bitflags::bitflags; use bitflags::bitflags;
use ctru_sys::{ use ctru_sys::{

4
ctru-rs/src/services/am.rs

@ -5,8 +5,8 @@
//! - Install compatible applications to the console. //! - Install compatible applications to the console.
//! //!
//! TODO: [`ctru-rs`](crate) doesn't support installing or uninstalling titles yet. //! TODO: [`ctru-rs`](crate) doesn't support installing or uninstalling titles yet.
#[doc(alias = "app")] #![doc(alias = "app")]
#[doc(alias = "manager")] #![doc(alias = "manager")]
use crate::error::ResultCode; use crate::error::ResultCode;
use crate::services::fs::FsMediaType; use crate::services::fs::FsMediaType;

2
ctru-rs/src/services/cam.rs

@ -2,7 +2,7 @@
//! //!
//! The CAM service provides access to the built-in cameras. [`Camera`]s can return images //! The CAM service provides access to the built-in cameras. [`Camera`]s can return images
//! in the form of byte vectors which can be displayed to the screen or used in other ways. //! in the form of byte vectors which can be displayed to the screen or used in other ways.
#[doc(alias = "camera")] #![doc(alias = "camera")]
use crate::error::{Error, ResultCode}; use crate::error::{Error, ResultCode};
use crate::services::gspgpu::FramebufferFormat; use crate::services::gspgpu::FramebufferFormat;

2
ctru-rs/src/services/cfgu.rs

@ -1,7 +1,7 @@
//! System Configuration service. //! System Configuration service.
//! //!
//! This module contains basic methods to retrieve the console's system configuration. //! This module contains basic methods to retrieve the console's system configuration.
#[doc(alias = "configuration")] #![doc(alias = "configuration")]
use crate::error::ResultCode; use crate::error::ResultCode;

2
ctru-rs/src/services/fs.rs

@ -3,7 +3,7 @@
//! This module contains basic methods to manipulate the contents of the 3DS's filesystem. //! This module contains basic methods to manipulate the contents of the 3DS's filesystem.
//! Only the SD card is currently supported. You should prefer using `std::fs`. //! Only the SD card is currently supported. You should prefer using `std::fs`.
// TODO: Refactor service to accomodate for various changes (such as SMDH support). Properly document the public API. // TODO: Refactor service to accomodate for various changes (such as SMDH support). Properly document the public API.
#[doc(alias = "filesystem")] #![doc(alias = "filesystem")]
use bitflags::bitflags; use bitflags::bitflags;
use std::ffi::OsString; use std::ffi::OsString;

2
ctru-rs/src/services/gfx.rs

@ -2,7 +2,7 @@
//! //!
//! The GFX service controls (in a somewhat high-level way) the console's LCD screens. //! The GFX service controls (in a somewhat high-level way) the console's LCD screens.
//! The screens are subordinate to the GFX service handle and can be used by only one borrower at a time. //! The screens are subordinate to the GFX service handle and can be used by only one borrower at a time.
#[doc(alias = "graphics")] #![doc(alias = "graphics")]
use std::cell::{Ref, RefCell, RefMut}; use std::cell::{Ref, RefCell, RefMut};
use std::marker::PhantomData; use std::marker::PhantomData;

6
ctru-rs/src/services/hid.rs

@ -3,9 +3,9 @@
//! 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 sound volume slider, the accelerometer, and the gyroscope.
// TODO: Implement volume slider, accelerometer and gyroscope + any other missing functionality. // TODO: Implement volume slider, accelerometer and gyroscope + any other missing functionality.
#[doc(alias = "input")] #![doc(alias = "input")]
#[doc(alias = "controller")] #![doc(alias = "controller")]
#[doc(alias = "gamepad")] #![doc(alias = "gamepad")]
use crate::error::ResultCode; use crate::error::ResultCode;
use bitflags::bitflags; use bitflags::bitflags;

2
ctru-rs/src/services/ndsp/mod.rs

@ -3,7 +3,7 @@
//! The NDSP service is used to handle communications to the DSP processor present on the console's motherboard. //! The NDSP service is used to handle communications to the DSP processor present on the console's motherboard.
//! Thanks to the DSP processor the program can play sound effects and music on the console's built-in speakers or to any audio device //! Thanks to the DSP processor the program can play sound effects and music on the console's built-in speakers or to any audio device
//! connected via the audio jack. //! connected via the audio jack.
#[doc(alias = "audio")] #![doc(alias = "audio")]
pub mod wave; pub mod wave;
use wave::{Status, Wave}; use wave::{Status, Wave};

10
ctru-rs/src/services/romfs.rs

@ -18,8 +18,14 @@
//! ``` //! ```
//! //!
//! Alternatively, you can include the RomFS archive manually when building with `3dsxtool`. //! Alternatively, you can include the RomFS archive manually when building with `3dsxtool`.
#[doc(alias = "embed")] //!
#[doc(alias = "filesystem")] //! # Notes
//!
//! `std::path` has problems when parsing file paths that include the `romfs:` prefix.
//! As such, it's suggested to use the paths directly or to do simple append operations to avoid unexpected behaviour.
//! Related [issue](https://github.com/rust-lang/rust/issues/52331).
#![doc(alias = "embed")]
#![doc(alias = "filesystem")]
use crate::error::ResultCode; use crate::error::ResultCode;
use std::ffi::CStr; use std::ffi::CStr;

4
ctru-rs/src/services/soc.rs

@ -2,8 +2,8 @@
//! //!
//! By using this service the program enables the use of network sockets and utilities such as those found in `std::net`, which are completely inaccessible by default. //! By using this service the program enables the use of network sockets and utilities such as those found in `std::net`, which are completely inaccessible by default.
//! As such, remember to hold a handle to this service handle while using any network functionality, or else the `std::net` methods will return generic OS errors. //! As such, remember to hold a handle to this service handle while using any network functionality, or else the `std::net` methods will return generic OS errors.
#[doc(alias = "socket")] #![doc(alias = "socket")]
#[doc(alias = "network")] #![doc(alias = "network")]
use libc::memalign; use libc::memalign;
use std::net::Ipv4Addr; use std::net::Ipv4Addr;

Loading…
Cancel
Save