#[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_charA 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: boolOverrides 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
- the basename of the compressed file (containing the content file), without extension OR
- 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: boolIf 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
impl Clone for retro_system_content_info_override
Source§fn clone(&self) -> retro_system_content_info_override
fn clone(&self) -> retro_system_content_info_override
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more