Remember whether game is muted
This commit is contained in:
@@ -12,8 +12,11 @@ use tracing::error;
|
||||
use tracing_subscriber::{EnvFilter, Layer, layer::SubscriberExt, util::SubscriberInitExt};
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
||||
use crate::{config::SimConfig, emulator::SimId, persistence::Persistence};
|
||||
|
||||
mod app;
|
||||
mod audio;
|
||||
mod config;
|
||||
mod controller;
|
||||
mod emulator;
|
||||
mod gdbserver;
|
||||
@@ -100,6 +103,8 @@ fn main() -> Result<()> {
|
||||
|
||||
let args = Args::parse();
|
||||
|
||||
let persistence = Persistence::new();
|
||||
|
||||
let (mut builder, client) = EmulatorBuilder::new();
|
||||
if let Some(path) = &args.rom {
|
||||
builder = builder.with_rom(path);
|
||||
@@ -113,6 +118,9 @@ fn main() -> Result<()> {
|
||||
if args.profile {
|
||||
builder = builder.start_paused(true)
|
||||
}
|
||||
let p1_audio_on = SimConfig::load(&persistence, SimId::Player1).audio_enabled;
|
||||
let p2_audio_on = SimConfig::load(&persistence, SimId::Player2).audio_enabled;
|
||||
builder = builder.with_audio_on(p1_audio_on, p2_audio_on);
|
||||
|
||||
ThreadBuilder::default()
|
||||
.name("Emulator".to_owned())
|
||||
@@ -134,6 +142,7 @@ fn main() -> Result<()> {
|
||||
event_loop.run_app(&mut Application::new(
|
||||
client,
|
||||
proxy,
|
||||
persistence,
|
||||
args.debug_port,
|
||||
args.profile,
|
||||
))?;
|
||||
|
||||
Reference in New Issue
Block a user