pub(crate) struct CoreWrapper {Show 16 fields
pub(crate) environment_set: bool,
pub(crate) environment_callback: retro_environment_t,
pub(crate) video_refresh_callback: retro_video_refresh_t,
pub(crate) audio_sample_callback: retro_audio_sample_t,
pub(crate) audio_sample_batch_callback: retro_audio_sample_batch_t,
pub(crate) input_poll_callback: retro_input_poll_t,
pub(crate) input_state_callback: retro_input_state_t,
pub(crate) can_dupe: bool,
pub(crate) had_frame: bool,
pub(crate) last_width: u32,
pub(crate) last_height: u32,
pub(crate) last_pitch: usize,
pub(crate) supports_bitmasks: bool,
pub(crate) frame_delta: Option<i64>,
pub(crate) interfaces: Arc<RwLock<InterfaceList>>,
pub(crate) core: Box<dyn Core>,
}Expand description
Holds the core instance as well as runtime information from the libretro frontend.
This struct gets used in the code generated by the retro_core!()-macro.
Fields§
§environment_set: bool§environment_callback: retro_environment_t§video_refresh_callback: retro_video_refresh_tRender a frame. Pixel format is 15-bit 0RGB1555 native endian
unless changed (see RETRO_ENVIRONMENT_SET_PIXEL_FORMAT).
Width and height specify dimensions of buffer. Pitch specifices length in bytes between two lines in buffer.
For performance reasons, it is highly recommended to have a frame
that is packed in memory, i.e. pitch == width * byte_per_pixel.
Certain graphic APIs, such as OpenGL ES, do not like textures
that are not packed in memory.
audio_sample_callback: retro_audio_sample_tRenders a single audio frame. Should only be used if implementation generates a single sample at a time. Format is signed 16-bit native endian.
audio_sample_batch_callback: retro_audio_sample_batch_tRenders multiple audio frames in one go.
One frame is defined as a sample of left and right channels, interleaved.
I.e. int16_t buf[4] = { l, r, l, r }; would be 2 frames.
Only one of the audio callbacks must ever be used.
input_poll_callback: retro_input_poll_tPolls input.
input_state_callback: retro_input_state_tQueries for input for player port. device will be masked with
RETRO_DEVICE_MASK.
Specialization of devices such as RETRO_DEVICE_JOYPAD_MULTITAP that
have been set with Core::on_set_controller_port_device
will still use the higher level RETRO_DEVICE_JOYPAD to request input.
can_dupe: bool§had_frame: bool§last_width: u32§last_height: u32§last_pitch: usize§supports_bitmasks: bool§frame_delta: Option<i64>§interfaces: Arc<RwLock<InterfaceList>>§core: Box<dyn Core>The wrapped Core implementation.