Struct retro_game_info_ext

Source
#[repr(C)]
pub struct retro_game_info_ext { pub full_path: *const c_char, pub archive_path: *const c_char, pub archive_file: *const c_char, pub dir: *const c_char, pub name: *const c_char, pub ext: *const c_char, pub meta: *const c_char, pub data: *const c_void, pub size: usize, pub file_in_archive: bool, pub persistent_data: bool, }
Expand description

Similar to retro_game_info, but provides extended information about the source content file and game memory buffer status. And array of retro_game_info_ext is returned by RETRO_ENVIRONMENT_GET_GAME_INFO_EXT NOTE: In the following descriptions, references to retro_load_game() may be replaced with retro_load_game_special()

Fields§

§full_path: *const c_char
  • If file_in_archive is false, contains a valid path to an existent content file (UTF-8 encoded)
  • If file_in_archive is true, may be NULL
§archive_path: *const c_char
  • If file_in_archive is false, may be NULL
  • If file_in_archive is true, contains a valid path to an existent compressed file inside which the content file is located (UTF-8 encoded)
§archive_file: *const c_char
  • If file_in_archive is false, may be NULL
  • If file_in_archive is true, contain a valid path to an existent content file inside the compressed file referred to by archive_path (UTF-8 encoded) e.g. for a compressed file ‘/path/to/foo.zip’ containing ‘bar.sfc’

    archive_path will be ‘/path/to/foo.zip’ archive_file will be ‘bar.sfc’

§dir: *const c_char
  • If file_in_archive is false, contains a valid path to the directory in which the content file exists (UTF-8 encoded)
  • If file_in_archive is true, contains a valid path to the directory in which the compressed file (containing the content file) exists (UTF-8 encoded)
§name: *const c_char

Contains the canonical name/ID of the content file (UTF-8 encoded). Intended for use when identifying ‘complementary’ content named after the loaded file - i.e. companion data of a different format (a CD image required by a ROM), texture packs, internally handled save files, etc.

  • If file_in_archive is false, contains the basename of the content file, without extension
  • If file_in_archive is true, then string is implementation specific. A frontend may choose to set a name value of: 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 RetroArch sets the ‘name’ value according to (1). A frontend that supports routine loading of content from archives containing multiple unrelated content files may set the ‘name’ value according to (2).
§ext: *const c_char
  • If file_in_archive is false, contains the extension of the content file in lower case format
  • If file_in_archive is true, contains the extension of the content file inside the compressed file, in lower case format
§meta: *const c_char

String of implementation specific meta-data.

§data: *const c_void

Memory buffer of loaded game content. Will be NULL: IF

  • retro_system_info::need_fullpath is true and retro_system_content_info_override::need_fullpath is unset OR
  • retro_system_content_info_override::need_fullpath is true
§size: usize

Size of game content memory buffer, in bytes

§file_in_archive: bool

True if loaded content file is inside a compressed archive

§persistent_data: bool
  • If data is NULL, value is unset/ignored
  • If data is non-NULL:
    • If persistent_data is false, data and size are valid only until retro_load_game() returns
    • If persistent_data is true, data and size are are valid until retro_deinit() returns

Trait Implementations§

Source§

impl Clone for retro_game_info_ext

Source§

fn clone(&self) -> retro_game_info_ext

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for retro_game_info_ext

Source§

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

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

impl Copy for retro_game_info_ext

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.