2021-08-18 14:32:55 -07:00
|
|
|
[package]
|
|
|
|
|
name = "ferretro_components"
|
|
|
|
|
version = "0.1.0"
|
2021-08-18 16:17:38 -07:00
|
|
|
authors = ["lifning <lifning+git@pm.me>", "viv <vvnl+git@protonmail.com>"]
|
video and audio callback API change:
fn video_refresh(&mut self, data: &[u8], width: c_uint, height: c_uint, pitch: c_uint);
fn video_refresh_dupe(&mut self, width: c_uint, height: c_uint, pitch: c_uint);
fn video_refresh_hw(&mut self, width: c_uint, height: c_uint);
fn audio_sample(&mut self, left: i16, right: i16);
fn audio_sample_batch(&mut self, stereo_pcm: &[i16]) -> usize;
have been replaced with
fn video_refresh(&mut self, frame: &VideoFrame);
fn audio_samples(&mut self, stereo_pcm: &[i16]) -> usize;
where VideoFrame is
pub enum VideoFrame<'a> {
XRGB1555 { data: &'a [u16], width: c_uint, height: c_uint, pitch_u16: usize },
RGB565 { data: &'a [u16], width: c_uint, height: c_uint, pitch_u16: usize },
XRGB8888 { data: &'a [u32], width: c_uint, height: c_uint, pitch_u32: usize },
Duplicate { width: c_uint, height: c_uint, pitch_u8: usize, },
HardwareRender { width: c_uint, height: c_uint, },
}
use `pub fn VideoFrame::data_pitch_as_bytes(&self) -> Option<(&'a [u8], usize)>` for things that need to access the framebuffer data as a byte array rather than a pixel array.
2021-11-01 00:02:25 -07:00
|
|
|
edition = "2021"
|
2021-08-18 14:32:55 -07:00
|
|
|
|
|
|
|
|
[build-dependencies]
|
|
|
|
|
cc = "^1"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2021-11-11 16:09:14 -08:00
|
|
|
ferretro_base = { path = "../ferretro_base" }
|
2021-08-18 14:32:55 -07:00
|
|
|
libloading = "0.5"
|
|
|
|
|
num_enum = "0.4"
|
|
|
|
|
ffmpeg-next = { version = "4.3.8", optional = true }
|
2021-12-10 18:57:00 -08:00
|
|
|
sdl2 = { version = "0.35.1", optional = true, features = ["gfx"] }
|
2021-08-21 21:45:57 -07:00
|
|
|
gl = { version = "0.14", optional = true }
|
2021-12-17 02:47:08 -08:00
|
|
|
cpal = { version = "0.13.3", optional = true }
|
|
|
|
|
ringbuf = { version = "0.2", optional = true }
|
2021-11-08 22:34:53 -08:00
|
|
|
tempfile = "3"
|
2021-08-18 14:32:55 -07:00
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
structopt = "0.3"
|
|
|
|
|
|
|
|
|
|
[features]
|
2021-11-11 16:09:14 -08:00
|
|
|
static = ["ferretro_base/static"]
|
2021-08-18 14:32:55 -07:00
|
|
|
ffmpeg_comp = ["ffmpeg-next"]
|
2021-12-17 02:47:08 -08:00
|
|
|
sdl2_comp = ["sdl2", "gl", "ringbuf"]
|
|
|
|
|
cpal_comp = ["cpal", "ringbuf"]
|
2021-10-15 21:37:48 -07:00
|
|
|
|
|
|
|
|
[[example]]
|
|
|
|
|
name = "multifunction_emulator"
|
2021-12-10 15:53:02 -08:00
|
|
|
required-features = ["sdl2_comp"]
|