Add audio, fix timing
This commit is contained in:
+5
-3
@@ -3,10 +3,11 @@ use std::{path::PathBuf, thread};
|
||||
use anyhow::Result;
|
||||
use app::App;
|
||||
use clap::Parser;
|
||||
use emulator::Emulator;
|
||||
use emulator::EmulatorBuilder;
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
mod app;
|
||||
mod audio;
|
||||
mod emulator;
|
||||
mod renderer;
|
||||
mod shrooms_vb_core;
|
||||
@@ -19,9 +20,10 @@ struct Args {
|
||||
fn main() -> Result<()> {
|
||||
let args = Args::parse();
|
||||
|
||||
let (mut emulator, client) = Emulator::new();
|
||||
emulator.load_rom(&args.rom)?;
|
||||
let (builder, client) = EmulatorBuilder::new();
|
||||
let builder = builder.with_rom(&args.rom);
|
||||
thread::spawn(move || {
|
||||
let mut emulator = builder.build().unwrap();
|
||||
emulator.run();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user