retro_system_content_info_override

Struct retro_system_content_info_override 

Source
#[repr(C)]
pub struct retro_system_content_info_override { pub extensions: *const c_char, pub need_fullpath: bool, pub persistent_data: bool, }
Expand description

Defines overrides which modify frontend handling of specific content file types. An array of retro_system_content_info_override is passed to RETRO_ENVIRONMENT_SET_CONTENT_INFO_OVERRIDE NOTE: In the following descriptions, references to retro_load_game() may be replaced with retro_load_game_special()

Fields§

§extensions: *const c_char

A list of file extensions for which the override should apply, delimited by a ‘pipe’ character (e.g. “md|sms|gg”) Permitted file extensions are limited to those included in retro_system_info::valid_extensions and/or retro_subsystem_rom_info::valid_extensions

§need_fullpath: bool

Overrides the need_fullpath value set in retro_system_info and/or retro_subsystem_rom_info. To reiterate:

If need_fullpath is true and retro_load_game() is called:

  • retro_game_info::path is guaranteed to contain a valid path to an existent file
  • retro_game_info::data and retro_game_info::size are invalid

If need_fullpath is false and retro_load_game() is called:

  • retro_game_info::path may be NULL
  • retro_game_info::data and retro_game_info::size are guaranteed to be valid

In addition:

If need_fullpath is true and retro_load_game() is called:

  • retro_game_info_ext::full_path is guaranteed to contain a valid path to an existent file
  • retro_game_info_ext::archive_path may be NULL
  • retro_game_info_ext::archive_file may be NULL
  • retro_game_info_ext::dir is guaranteed to contain a valid path to the directory in which the content file exists
  • retro_game_info_ext::name is guaranteed to contain the basename of the content file, without extension
  • retro_game_info_ext::ext is guaranteed to contain the extension of the content file in lower case format
  • retro_game_info_ext::data and retro_game_info_ext::size are invalid

If need_fullpath is false and retro_load_game() is called:

  • If retro_game_info_ext::file_in_archive is false:
    • retro_game_info_ext::full_path is guaranteed to contain a valid path to an existent file
    • retro_game_info_ext::archive_path may be NULL
    • retro_game_info_ext::archive_file may be NULL
    • retro_game_info_ext::dir is guaranteed to contain a valid path to the directory in which the content file exists
    • retro_game_info_ext::name is guaranteed to contain the basename of the content file, without extension
    • retro_game_info_ext::ext is guaranteed to contain the extension of the content file in lower case format
  • If retro_game_info_ext::file_in_archive is true:
    • retro_game_info_ext::full_path may be NULL
    • retro_game_info_ext::archive_path is guaranteed to contain a valid path to an existent compressed file inside which the content file is located
    • retro_game_info_ext::archive_file is guaranteed to contain a valid path to an existent content file inside the compressed file referred to by retro_game_info_ext::archive_path e.g. for a compressed file ‘/path/to/foo.zip’ containing ‘bar.sfc’ > retro_game_info_ext::archive_path will be ‘/path/to/foo.zip’ > retro_game_info_ext::archive_file will be ‘bar.sfc’
    • retro_game_info_ext::dir is guaranteed to contain a valid path to the directory in which the compressed file (containing the content file) exists
    • retro_game_info_ext::name is guaranteed to contain EITHER
      1. the basename of the compressed file (containing the content file), without extension OR
      2. the basename of the content file inside the compressed file, without extension In either case, a core should consider ‘name’ to be the canonical name/ID of the the content file
    • retro_game_info_ext::ext is guaranteed to contain the extension of the content file inside the compressed file, in lower case format
  • retro_game_info_ext::data and retro_game_info_ext::size are guaranteed to be valid
§persistent_data: bool

If need_fullpath is false, specifies whether the content data buffer available in retro_load_game() is ‘persistent’

If persistent_data is false and retro_load_game() is called:

  • retro_game_info::data and retro_game_info::size are valid only until retro_load_game() returns
  • retro_game_info_ext::data and retro_game_info_ext::size are valid only until retro_load_game() returns

If persistent_data is true and retro_load_game() is called:

  • retro_game_info::data and retro_game_info::size are valid until retro_deinit() returns
  • retro_game_info_ext::data and retro_game_info_ext::size are valid until retro_deinit() returns

Trait Implementations§

Source§

impl Clone for retro_system_content_info_override

Source§

fn clone(&self) -> retro_system_content_info_override

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for retro_system_content_info_override

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for retro_system_content_info_override

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.