pub struct Environment<'a> { /* private fields */ }Expand description
Typed wrapper around libretro environment commands.
Use this during Core::on_set_environment, Core::init, and through
Runtime::environment for runtime-safe commands. Methods retain backing
storage when libretro allows the frontend to keep pointers after a call.
Implementations§
Source§impl Environment<'_>
impl Environment<'_>
pub fn set_rotation(&mut self, rotation: VideoRotation) -> bool
pub fn overscan(&mut self) -> Option<bool>
pub fn can_dupe_frames(&mut self) -> Option<bool>
pub fn shutdown(&mut self) -> bool
pub fn set_system_av_info(&mut self, info: SystemAvInfo) -> bool
pub fn extended_game_info(&mut self) -> Option<ExtendedGameInfo<'_>>
pub fn extended_game_infos( &mut self, count: usize, ) -> Option<Vec<ExtendedGameInfo<'_>>>
pub fn set_performance_level(&mut self, level: PerformanceLevel) -> bool
pub fn perf_interface(&mut self) -> Option<PerfInterface>
pub fn system_directory(&mut self) -> Option<String>
pub fn libretro_path(&mut self) -> Option<String>
pub fn core_assets_directory(&mut self) -> Option<String>
pub fn content_directory(&mut self) -> Option<String>
pub fn save_directory(&mut self) -> Option<String>
pub fn username(&mut self) -> Option<String>
pub fn playlist_directory(&mut self) -> Option<String>
pub fn file_browser_start_directory(&mut self) -> Option<String>
pub fn language(&mut self) -> Option<Language>
pub fn jit_capable(&mut self) -> Option<bool>
pub fn set_support_achievements(&mut self, supported: bool) -> bool
pub fn audio_video_enable(&mut self) -> Option<AvEnableFlags>
pub fn fastforwarding(&mut self) -> Option<bool>
pub fn fastforwarding_override_supported(&mut self) -> bool
pub fn set_fastforwarding_override( &mut self, override_: FastForwardingOverride, ) -> bool
pub fn target_refresh_rate(&mut self) -> Option<RefreshRateHz>
pub fn target_sample_rate(&mut self) -> Option<AudioSampleRateHz>
pub fn throttle_state(&mut self) -> Option<ThrottleState>
pub fn savestate_context(&mut self) -> Option<SavestateContext>
pub fn set_memory_maps( &mut self, descriptors: &[MemoryMapDescriptor<'_>], ) -> bool
pub fn set_controller_info(&mut self, ports: &[ControllerInfo]) -> bool
pub fn set_proc_address_callback(&mut self) -> bool
pub fn set_subsystem_info(&mut self, subsystems: &[SubsystemInfo]) -> bool
pub fn disk_control_interface_version( &mut self, ) -> Option<DiskControlInterfaceVersion>
pub fn set_disk_control_interface(&mut self) -> bool
pub fn clear_disk_control_interface(&mut self) -> bool
pub fn set_disk_control_ext_interface(&mut self) -> bool
pub fn clear_disk_control_ext_interface(&mut self) -> bool
pub fn set_netpacket_interface( &mut self, protocol_version: Option<&str>, ) -> bool
pub fn clear_netpacket_interface(&mut self) -> bool
pub fn current_software_framebuffer( &mut self, request: SoftwareFramebufferRequest, ) -> Option<SoftwareFramebuffer>
pub fn set_minimum_audio_latency( &mut self, latency: Option<AudioLatencyMillis>, ) -> bool
pub fn set_audio_buffer_status_callback(&mut self, enabled: bool) -> bool
pub fn audio_callback_available(&mut self) -> bool
pub fn set_audio_callback(&mut self) -> bool
pub fn clear_audio_callback(&mut self) -> bool
pub fn set_frame_time_callback(&mut self, reference: FrameTime) -> bool
pub fn clear_frame_time_callback(&mut self) -> bool
pub fn message_interface_version(&mut self) -> Option<u32>
pub fn set_message_ext(&mut self, message: ExtendedMessage) -> bool
pub fn input_device_capabilities(&mut self) -> Option<InputDeviceCapabilities>
pub fn supports_joypad_bitmasks(&mut self) -> bool
pub fn set_keyboard_callback(&mut self) -> bool
pub fn set_input_descriptors(&mut self, descriptors: &[InputDescriptor]) -> bool
pub fn input_max_users(&mut self) -> Option<u32>
pub fn led_interface(&mut self) -> Option<LedInterface>
pub fn rumble_interface(&mut self) -> Option<RumbleInterface>
pub fn device_power(&mut self) -> Option<DevicePower>
pub fn netplay_client_index(&mut self) -> Option<NetplayClientId>
pub fn sensor_interface(&mut self) -> Option<SensorInterface>
pub fn camera_interface( &mut self, request: CameraRequest, ) -> Option<CameraInterface>
pub fn location_interface(&mut self) -> Option<LocationInterface>
pub fn microphone_interface(&mut self) -> Option<MicrophoneInterface>
pub fn midi_interface_available(&mut self) -> bool
pub fn midi_interface(&mut self) -> Option<MidiInterface>
pub fn set_serialization_quirks( &mut self, quirks: SerializationQuirks, ) -> Option<SerializationQuirks>
Source§impl<'a> Environment<'a>
impl<'a> Environment<'a>
pub fn logger(&mut self) -> Logger
pub fn set_support_no_game(&mut self, enabled: bool) -> bool
pub fn set_message(&mut self, message: impl AsRef<str>, frames: u32) -> bool
pub fn set_variables(&mut self, variables: &[VariableDefinition]) -> bool
pub fn core_options_version(&mut self) -> CoreOptionsVersion
pub fn set_core_options( &mut self, options: &CoreOptions, ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_options_legacy( &mut self, options: &CoreOptions, ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_options_v1( &mut self, definitions: &[CoreOptionDefinition], ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_options_v1_intl( &mut self, us: &[CoreOptionDefinition], local: Option<&[CoreOptionDefinition]>, ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_options_v2( &mut self, options: &CoreOptions, ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_options_v2_intl( &mut self, us: &CoreOptions, local: Option<&CoreOptions>, ) -> Result<bool, CoreOptionsBuildError>
pub fn set_core_option_display(&mut self, display: CoreOptionDisplay) -> bool
pub fn set_core_options_update_display_callback(&mut self) -> bool
pub fn set_variable(&mut self, key: &str, value: Option<&str>) -> bool
pub fn vfs_interface( &mut self, version: VfsInterfaceVersion, ) -> Option<VfsInterface>
pub fn set_content_info_overrides( &mut self, overrides: &[ContentInfoOverride], ) -> bool
pub fn set_pixel_format(&mut self, format: PixelFormat) -> bool
pub fn set_geometry(&mut self, geometry: GameGeometry) -> bool
pub fn set_hw_render(&mut self, config: HwRenderConfig) -> bool
pub fn hw_render_interface(&mut self) -> Option<HwRenderInterface<'_>>
pub fn hw_render_context_negotiation_interface_support( &mut self, interface_type: HwRenderContextNegotiationInterfaceType, ) -> Option<u32>
pub fn set_hw_render_context_negotiation_interface( &mut self, interface: HwRenderContextNegotiationInterface, ) -> bool
pub fn preferred_hw_render(&mut self) -> Option<PreferredHwRender>
pub fn set_hw_render_from_candidates( &mut self, candidates: &[HwRenderConfig], ) -> Option<HwRenderConfig>
pub fn get_variable(&mut self, key: &str) -> Option<String>
pub fn variables_updated(&mut self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for Environment<'a>
impl<'a> !RefUnwindSafe for Environment<'a>
impl<'a> Send for Environment<'a>
impl<'a> !Sync for Environment<'a>
impl<'a> Unpin for Environment<'a>
impl<'a> UnsafeUnpin for Environment<'a>
impl<'a> !UnwindSafe for Environment<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more