2021-08-18 23:32:55 +02:00
|
|
|
[package]
|
|
|
|
name = "ferretro_components"
|
|
|
|
version = "0.1.0"
|
2021-08-19 01:17:38 +02: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 08:02:25 +01:00
|
|
|
edition = "2021"
|
2021-08-18 23:32:55 +02:00
|
|
|
|
|
|
|
[build-dependencies]
|
|
|
|
cc = "^1"
|
|
|
|
|
|
|
|
[dependencies]
|
2021-11-12 01:09:14 +01:00
|
|
|
ferretro_base = { path = "../ferretro_base" }
|
2021-08-18 23:32:55 +02:00
|
|
|
libloading = "0.5"
|
|
|
|
num_enum = "0.4"
|
|
|
|
ffmpeg-next = { version = "4.3.8", optional = true }
|
2021-12-11 03:57:00 +01:00
|
|
|
sdl2 = { version = "0.35.1", optional = true, features = ["gfx"] }
|
2021-08-22 06:45:57 +02:00
|
|
|
gl = { version = "0.14", optional = true }
|
2021-12-17 11:47:08 +01:00
|
|
|
cpal = { version = "0.13.3", optional = true }
|
|
|
|
ringbuf = { version = "0.2", optional = true }
|
2021-11-09 07:34:53 +01:00
|
|
|
tempfile = "3"
|
2021-08-18 23:32:55 +02:00
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
structopt = "0.3"
|
|
|
|
|
|
|
|
[features]
|
2021-11-12 01:09:14 +01:00
|
|
|
static = ["ferretro_base/static"]
|
2021-08-18 23:32:55 +02:00
|
|
|
ffmpeg_comp = ["ffmpeg-next"]
|
2021-12-17 11:47:08 +01:00
|
|
|
sdl2_comp = ["sdl2", "gl", "ringbuf"]
|
|
|
|
cpal_comp = ["cpal", "ringbuf"]
|
2021-10-16 06:37:48 +02:00
|
|
|
|
|
|
|
[[example]]
|
|
|
|
name = "multifunction_emulator"
|
2021-12-11 00:53:02 +01:00
|
|
|
required-features = ["sdl2_comp"]
|