cargo: fmt

Former-commit-id: 851b6e1179979d9d4667b192332ea733009bbb3e
Former-commit-id: 573fb73eed443d9a85ea2581c50d5dddfa36612a
This commit is contained in:
Muhammad Nauman Raza 2024-03-22 23:47:45 +00:00
parent a42ee6a4fe
commit 8a188b82af
2 changed files with 7 additions and 4 deletions

View file

@ -304,9 +304,13 @@ impl BusIO for IoDevices {
fn write_8(&mut self, addr: Addr, value: u8) {
match addr + IO_BASE {
/* FIFO_A */
0x0400_00A0 | 0x0400_00A1 | 0x0400_00A2 | 0x0400_00A3 => { self.sound.write_fifo(0, value as i8) }
0x0400_00A0 | 0x0400_00A1 | 0x0400_00A2 | 0x0400_00A3 => {
self.sound.write_fifo(0, value as i8)
}
/* FIFO_B */
0x0400_00A4 | 0x0400_00A5 | 0x0400_00A6 | 0x0400_00A7 => { self.sound.write_fifo(1, value as i8) }
0x0400_00A4 | 0x0400_00A5 | 0x0400_00A6 | 0x0400_00A7 => {
self.sound.write_fifo(1, value as i8)
}
_ => {
let t = self.read_16(addr & !1);
let t = if addr & 1 != 0 {

View file

@ -59,8 +59,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let sdl_context = sdl2::init().expect("failed to initialize sdl2");
let controller_subsystem = sdl_context.game_controller()?;
let controller_mappings =
include_str!("../../../external/gamecontrollerdb.txt");
let controller_mappings = include_str!("../../../external/gamecontrollerdb.txt");
controller_subsystem.load_mappings_from_read(&mut Cursor::new(controller_mappings))?;
let available_controllers = (0..controller_subsystem.num_joysticks()?)