move file init
This commit is contained in:
parent
3d5ae32960
commit
0baf6dc436
|
@ -106,27 +106,6 @@ impl Plugin for GameboyEmu {
|
|||
buffer_config: &BufferConfig,
|
||||
_context: &mut impl InitContext<Self>,
|
||||
) -> bool {
|
||||
let bootrom = if INCLUDE_BOOTROM {
|
||||
Some(RomFile::Raw(
|
||||
include_bytes!("../../bootrom/dmg_boot.bin").to_vec(),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let options = gb_emu_lib::Options {
|
||||
rom: RomFile::Raw(
|
||||
include_bytes!("../../test-roms/Tetris.gb")
|
||||
.to_vec()
|
||||
.to_vec(),
|
||||
),
|
||||
save_path: None,
|
||||
no_save: true,
|
||||
bootrom,
|
||||
connect_serial: false,
|
||||
verbose: false,
|
||||
};
|
||||
|
||||
if let Some(ref mut vars) = self.vars {
|
||||
let (output, rx) = AudioOutput::new(
|
||||
buffer_config.sample_rate,
|
||||
|
@ -138,6 +117,27 @@ impl Plugin for GameboyEmu {
|
|||
vars.emulator_core.replace_output(output);
|
||||
vars.rx = rx;
|
||||
} else {
|
||||
let bootrom = if INCLUDE_BOOTROM {
|
||||
Some(RomFile::Raw(
|
||||
include_bytes!("../../bootrom/dmg_boot.bin").to_vec(),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let options = gb_emu_lib::Options {
|
||||
rom: RomFile::Raw(
|
||||
include_bytes!("../../test-roms/Tetris.gb")
|
||||
.to_vec()
|
||||
.to_vec(),
|
||||
),
|
||||
save_path: None,
|
||||
no_save: true,
|
||||
bootrom,
|
||||
connect_serial: false,
|
||||
verbose: false,
|
||||
};
|
||||
|
||||
let (sender, receiver) = channel::<EmulatorMessage>();
|
||||
|
||||
let (output, rx) = AudioOutput::new(
|
||||
|
|
Loading…
Reference in a new issue