update deps
This commit is contained in:
parent
861b8c2996
commit
e414253ce7
1401
Cargo.lock
generated
1401
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -21,11 +21,11 @@ nokhwa = { version = "0.10", features = [
|
|||
"input-avfoundation",
|
||||
], optional = true }
|
||||
send_wrapper = { version = "0.6.0", optional = true }
|
||||
winit = { version = "0.29", features = ["rwh_05"] }
|
||||
winit_input_helper = "0.15"
|
||||
winit = { version = "0.29.15", features = ["rwh_05"] }
|
||||
winit_input_helper = "0.16"
|
||||
raw-window-handle = { workspace = true }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
image = { version = "0.24", default-features = false, features = ["png"] }
|
||||
image = { version = "0.25.1", default-features = false, features = ["png"] }
|
||||
bytemuck = "1.14"
|
||||
chrono = "0.4"
|
||||
log = { workspace = true }
|
||||
|
|
|
@ -3,7 +3,7 @@ use cpal::{
|
|||
Stream,
|
||||
};
|
||||
use futures::executor;
|
||||
use gb_emu_lib::connect::{AudioOutput, DownsampleType};
|
||||
use gb_emu_lib::connect::{AsyncConsumer, AudioOutput, DownsampleType};
|
||||
|
||||
use crate::access_config;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ nih_plug = { workspace = true, features = [
|
|||
"vst3",
|
||||
], optional = true }
|
||||
baseview = { workspace = true, optional = true }
|
||||
async-ringbuf = { version = "0.1", optional = true }
|
||||
async-ringbuf = { version = "0.2.1", optional = true }
|
||||
futures = { version = "0.3", optional = true }
|
||||
keyboard-types = { version = "0.6.2", optional = true }
|
||||
raw-window-handle = { workspace = true }
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
use async_ringbuf::AsyncHeapConsumer;
|
||||
use async_ringbuf::{
|
||||
traits::{AsyncConsumer, Observer},
|
||||
AsyncHeapCons,
|
||||
};
|
||||
use baseview::Size;
|
||||
use futures::executor;
|
||||
use gb_emu_lib::{
|
||||
|
@ -51,7 +54,7 @@ struct EmuParams {
|
|||
}
|
||||
|
||||
struct EmuVars {
|
||||
rx: AsyncHeapConsumer<[f32; 2]>,
|
||||
rx: AsyncHeapCons<[f32; 2]>,
|
||||
emulator_core: EmulatorCore<[u8; 4]>,
|
||||
serial_tx: Sender<u8>,
|
||||
}
|
||||
|
|
|
@ -9,19 +9,19 @@ identifier = "com.alexjanka.TWINC.gui"
|
|||
osx_file_extensions = [[["Game Boy ROM", "Viewer"], ["gb", "gbc"]]]
|
||||
|
||||
[features]
|
||||
default = ["macos-ui", "crossplatform-ui", "force-crossplatform-ui"]
|
||||
default = ["macos-ui", "crossplatform-ui"]
|
||||
macos-ui = ["cacao", "objc", "uuid"]
|
||||
crossplatform-ui = ["gtk", "adw", "glib-build-tools"]
|
||||
force-crossplatform-ui = ["crossplatform-ui"]
|
||||
|
||||
[dependencies]
|
||||
adw = { version = "0.6.0", package = "libadwaita", features = [
|
||||
adw = { version = "0.7.0", package = "libadwaita", features = [
|
||||
"v1_4",
|
||||
"gtk_v4_12",
|
||||
"gtk_v4_6",
|
||||
], optional = true }
|
||||
frontend-common = { workspace = true }
|
||||
gb-emu-lib = { workspace = true }
|
||||
gtk = { version = "0.8.0", package = "gtk4", features = [
|
||||
gtk = { version = "0.9.0", package = "gtk4", features = [
|
||||
"v4_12",
|
||||
], optional = true }
|
||||
twinc_emu_vst = { path = "../gb-vst", default-features = false }
|
||||
|
@ -40,4 +40,4 @@ uuid = { version = "1.6", features = ["v4", "fast-rng"], optional = true }
|
|||
|
||||
|
||||
[build-dependencies]
|
||||
glib-build-tools = { version = "0.19.0", optional = true }
|
||||
glib-build-tools = { version = "0.20.0", optional = true }
|
||||
|
|
|
@ -4,6 +4,7 @@ use std::path::PathBuf;
|
|||
|
||||
use cacao::button::Button;
|
||||
use cacao::filesystem::FileSelectPanel;
|
||||
use cacao::image::{Image, ImageView};
|
||||
use cacao::input::TextField;
|
||||
use cacao::layout::{Layout, LayoutConstraint};
|
||||
use cacao::select::Select;
|
||||
|
@ -485,3 +486,43 @@ impl StepperViewToggle {
|
|||
self.enabled = !self.enabled;
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ImageViewWrapper {
|
||||
view: View,
|
||||
image_view: ImageView,
|
||||
_image: Image,
|
||||
}
|
||||
|
||||
impl ImageViewWrapper {
|
||||
pub fn new(image: Image) -> Self {
|
||||
let view = View::new();
|
||||
let image_view = ImageView::new();
|
||||
image_view.set_image(&image);
|
||||
view.add_subview(&image_view);
|
||||
|
||||
LayoutConstraint::activate(&[
|
||||
image_view
|
||||
.leading
|
||||
.constraint_equal_to(&view.leading)
|
||||
.offset(10.),
|
||||
image_view.top.constraint_equal_to(&view.top).offset(10.),
|
||||
image_view
|
||||
.bottom
|
||||
.constraint_equal_to(&view.bottom)
|
||||
.offset(-10.),
|
||||
]);
|
||||
Self {
|
||||
view,
|
||||
image_view,
|
||||
_image: image,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn view(&self) -> &View {
|
||||
&self.view
|
||||
}
|
||||
|
||||
pub fn image_view(&self) -> &ImageView {
|
||||
&self.image_view
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version = "0.5.1"
|
|||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
default = ["config", "librashader", "wgpu-renderer"]
|
||||
clocked-serial = []
|
||||
librashader = [
|
||||
"dep:librashader",
|
||||
|
@ -34,9 +34,9 @@ error-colour = []
|
|||
|
||||
[dependencies]
|
||||
rand = "0.8.5"
|
||||
async-ringbuf = "0.1"
|
||||
futures = "0.3"
|
||||
itertools = "0.12"
|
||||
async-ringbuf = "0.2.1"
|
||||
futures = "0.3.30"
|
||||
itertools = "0.13.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_with = "3.0"
|
||||
bytemuck = "1.14"
|
||||
|
@ -51,13 +51,16 @@ librashader-common = { workspace = true, optional = true }
|
|||
directories = { version = "5.0", optional = true }
|
||||
ron = { version = "0.8", optional = true }
|
||||
lazy_static = "1.4"
|
||||
wgpu = { version = "0.20", optional = true }
|
||||
wgpu = { version = "22.0.0", optional = true }
|
||||
thiserror = { workspace = true }
|
||||
log = { workspace = true }
|
||||
anyhow = "1.0.86"
|
||||
|
||||
[build-dependencies]
|
||||
naga = { version = "0.19", optional = true, features = ["wgsl-in", "spv-out"] }
|
||||
naga = { version = "22.0.0", optional = true, features = [
|
||||
"wgsl-in",
|
||||
"spv-out",
|
||||
] }
|
||||
|
||||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
|
||||
ash-molten = { version = "0.16.0", optional = true }
|
||||
ash-molten = { version = "0.19.0", optional = true }
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
use async_ringbuf::{traits::Split, AsyncHeapCons, AsyncHeapProd, AsyncHeapRb};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
pub use async_ringbuf::traits::consumer::AsyncConsumer;
|
||||
|
||||
pub use crate::error::RomHeaderError;
|
||||
pub use crate::processor::memory::mmio::gpu::Colour;
|
||||
pub use crate::processor::memory::mmio::joypad::{JoypadButtons, JoypadState};
|
||||
|
@ -13,7 +16,6 @@ pub use crate::processor::memory::rom::{
|
|||
};
|
||||
pub use crate::processor::memory::Rom;
|
||||
pub use crate::{HEIGHT, WIDTH};
|
||||
use async_ringbuf::{AsyncHeapConsumer, AsyncHeapProducer, AsyncHeapRb};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum EmulatorMessage<ColourFormat>
|
||||
|
@ -98,7 +100,7 @@ pub struct ResolutionData {
|
|||
|
||||
pub struct AudioOutput {
|
||||
pub sample_rate: f32,
|
||||
pub send_rb: AsyncHeapProducer<[f32; 2]>,
|
||||
pub send_rb: AsyncHeapProd<[f32; 2]>,
|
||||
pub downsample_type: DownsampleType,
|
||||
}
|
||||
|
||||
|
@ -107,7 +109,7 @@ impl AudioOutput {
|
|||
sample_rate: f32,
|
||||
buffers_per_frame: usize,
|
||||
downsample_type: DownsampleType,
|
||||
) -> (Self, AsyncHeapConsumer<[f32; 2]>) {
|
||||
) -> (Self, AsyncHeapCons<[f32; 2]>) {
|
||||
let rb_len = (sample_rate as usize / 60) / buffers_per_frame;
|
||||
|
||||
let rb = AsyncHeapRb::<[f32; 2]>::new(rb_len);
|
||||
|
|
|
@ -7,6 +7,7 @@ use crate::{
|
|||
processor::memory::addresses::{AddressMarker, AudioAddress, WaveRamAddress},
|
||||
util::{get_bit, set_or_clear_bit},
|
||||
};
|
||||
use async_ringbuf::traits::{AsyncProducer, Observer};
|
||||
use futures::executor;
|
||||
use itertools::izip;
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ impl RendererBackend for WgpuBackend {
|
|||
required_features: wgpu::Features::ADDRESS_MODE_CLAMP_TO_BORDER,
|
||||
required_limits: wgpu::Limits::default(),
|
||||
label: None,
|
||||
memory_hints: wgpu::MemoryHints::default(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
|
||||
use async_ringbuf::AsyncHeapConsumer;
|
||||
use gb_emu_lib::{
|
||||
connect::{AudioOutput, EmulatorMessage, EmulatorOptions, RomFile},
|
||||
EmulatorCore,
|
||||
|
@ -9,7 +8,7 @@ use gb_emu_lib::{
|
|||
pub struct TestEmulator {
|
||||
pub core: EmulatorCore<[u8; 4]>,
|
||||
pub _sender: Sender<EmulatorMessage<[u8; 4]>>,
|
||||
pub _audio_rx: AsyncHeapConsumer<[f32; 2]>,
|
||||
pub _audio_rx: async_ringbuf::AsyncHeapCons<[f32; 2]>,
|
||||
pub serial_rx: Receiver<u8>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue