pub struct RetroInstance<T: RetroCore> {
pub system: Option<T>,
pub system_info: Option<RetroSystemInfo>,
pub system_av_info: Option<RetroSystemAvInfo>,
pub audio_sample: retro_audio_sample_t,
pub audio_sample_batch: retro_audio_sample_batch_t,
pub environment: Option<RetroEnvironment>,
pub input_poll: retro_input_poll_t,
pub input_state: retro_input_state_t,
pub video_refresh: retro_video_refresh_t,
}
Expand description
This is the glue layer between a RetroCore
implementation, and the libretro
API.
Fields§
§system: Option<T>
§system_info: Option<RetroSystemInfo>
§system_av_info: Option<RetroSystemAvInfo>
§audio_sample: retro_audio_sample_t
§audio_sample_batch: retro_audio_sample_batch_t
§environment: Option<RetroEnvironment>
§input_poll: retro_input_poll_t
§input_state: retro_input_state_t
§video_refresh: retro_video_refresh_t
Implementations§
Source§impl<T: RetroCore> RetroInstance<T>
impl<T: RetroCore> RetroInstance<T>
Sourcepub fn on_get_system_info(&mut self, info: &mut retro_system_info)
pub fn on_get_system_info(&mut self, info: &mut retro_system_info)
Invoked by a libretro
frontend, with the retro_get_system_info
API call.
Sourcepub fn on_get_system_av_info(&self, info: &mut retro_system_av_info)
pub fn on_get_system_av_info(&self, info: &mut retro_system_av_info)
Invoked by a libretro
frontend, with the retro_get_system_av_info
API call.
Sourcepub fn on_set_environment(&mut self, cb: retro_environment_t)
pub fn on_set_environment(&mut self, cb: retro_environment_t)
Invoked by a libretro
frontend, with the retro_set_environment
API call.
Sourcepub fn on_set_audio_sample(&mut self, cb: retro_audio_sample_t)
pub fn on_set_audio_sample(&mut self, cb: retro_audio_sample_t)
Invoked by a libretro
frontend, with the retro_set_audio_sample
API call.
Sourcepub fn on_set_audio_sample_batch(&mut self, cb: retro_audio_sample_batch_t)
pub fn on_set_audio_sample_batch(&mut self, cb: retro_audio_sample_batch_t)
Invoked by a libretro
frontend, with the retro_set_audio_sample_batch
API call.
Sourcepub fn on_set_input_poll(&mut self, cb: retro_input_poll_t)
pub fn on_set_input_poll(&mut self, cb: retro_input_poll_t)
Invoked by a libretro
frontend, with the retro_set_input_poll
API call.
Sourcepub fn on_set_input_state(&mut self, cb: retro_input_state_t)
pub fn on_set_input_state(&mut self, cb: retro_input_state_t)
Invoked by a libretro
frontend, with the retro_set_input_state
API call.
Sourcepub fn on_set_video_refresh(&mut self, cb: retro_video_refresh_t)
pub fn on_set_video_refresh(&mut self, cb: retro_video_refresh_t)
Invoked by a libretro
frontend, with the retro_set_video_refresh
API call.
Sourcepub fn on_set_controller_port_device(&mut self, port: c_uint, device: c_uint)
pub fn on_set_controller_port_device(&mut self, port: c_uint, device: c_uint)
Invoked by a libretro
frontend, with the retro_set_controller_port_device
API call.
Sourcepub fn on_serialize_size(&self) -> size_t
pub fn on_serialize_size(&self) -> size_t
Invoked by a libretro
frontend, with the retro_serialize_size
API call.
Sourcepub fn on_serialize(&self, data: *mut (), size: size_t) -> bool
pub fn on_serialize(&self, data: *mut (), size: size_t) -> bool
Invoked by a libretro
frontend, with the retro_serialize
API call.
Sourcepub fn on_unserialize(&mut self, data: *const (), size: size_t) -> bool
pub fn on_unserialize(&mut self, data: *const (), size: size_t) -> bool
Invoked by a libretro
frontend, with the retro_unserialize
API call.
Sourcepub fn on_cheat_reset(&mut self)
pub fn on_cheat_reset(&mut self)
Invoked by a libretro
frontend, with the retro_cheat_reset
API call.
Sourcepub fn on_cheat_set(
&mut self,
index: c_uint,
enabled: bool,
code: *const c_char,
)
pub fn on_cheat_set( &mut self, index: c_uint, enabled: bool, code: *const c_char, )
Invoked by a libretro
frontend, with the retro_cheat_set
API call.
Sourcepub fn on_load_game(&mut self, game: &retro_game_info) -> bool
pub fn on_load_game(&mut self, game: &retro_game_info) -> bool
Invoked by a libretro
frontend, with the retro_load_game
API call.
Sourcepub fn on_load_game_special(
&mut self,
game_type: c_uint,
info: &retro_game_info,
num_info: size_t,
) -> bool
pub fn on_load_game_special( &mut self, game_type: c_uint, info: &retro_game_info, num_info: size_t, ) -> bool
Invoked by a libretro
frontend, with the retro_load_game_special
API call.
Sourcepub fn on_unload_game(&mut self)
pub fn on_unload_game(&mut self)
Invoked by a libretro
frontend, with the retro_unload_game
API call.
Sourcepub fn on_get_region(&self) -> c_uint
pub fn on_get_region(&self) -> c_uint
Invoked by a libretro
frontend, with the retro_get_region
API call.
Sourcepub fn on_get_memory_data(&mut self, id: c_uint) -> *mut ()
pub fn on_get_memory_data(&mut self, id: c_uint) -> *mut ()
Invoked by a libretro
frontend, with the retro_get_memory_data
API call.
Sourcepub fn on_get_memory_size(&mut self, id: c_uint) -> size_t
pub fn on_get_memory_size(&mut self, id: c_uint) -> size_t
Invoked by a libretro
frontend, with the retro_get_memory_size
API call.