From 8a188b82af8affbed03bbd4c5ede48ae285f3c4d Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Fri, 22 Mar 2024 23:47:45 +0000 Subject: [PATCH] cargo: fmt Former-commit-id: 851b6e1179979d9d4667b192332ea733009bbb3e Former-commit-id: 573fb73eed443d9a85ea2581c50d5dddfa36612a --- core/src/iodev.rs | 8 ++++++-- platform/rustboyadvance-sdl2/src/main.rs | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/iodev.rs b/core/src/iodev.rs index bb51870..9281215 100644 --- a/core/src/iodev.rs +++ b/core/src/iodev.rs @@ -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 { diff --git a/platform/rustboyadvance-sdl2/src/main.rs b/platform/rustboyadvance-sdl2/src/main.rs index b38d084..4c7ec46 100644 --- a/platform/rustboyadvance-sdl2/src/main.rs +++ b/platform/rustboyadvance-sdl2/src/main.rs @@ -59,8 +59,7 @@ fn main() -> Result<(), Box> { 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()?)