From 8eac03365095da7782f43e8212f9c029f4b2a6ef Mon Sep 17 00:00:00 2001 From: Corwin Date: Thu, 23 Mar 2023 22:47:04 +0000 Subject: [PATCH] derive some traits on bitflags --- agb/src/display/mod.rs | 1 + agb/src/input.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/agb/src/display/mod.rs b/agb/src/display/mod.rs index 2b5d1e44..939c22d3 100644 --- a/agb/src/display/mod.rs +++ b/agb/src/display/mod.rs @@ -35,6 +35,7 @@ pub(crate) const DISPLAY_STATUS: MemoryMapped = unsafe { MemoryMapped::new( const VCOUNT: MemoryMapped = unsafe { MemoryMapped::new(0x0400_0006) }; bitflags! { + #[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)] struct GraphicsSettings: u16 { const PAGE_SELECT = 1 << 0x4; const OAM_HBLANK = 1 << 0x5; diff --git a/agb/src/input.rs b/agb/src/input.rs index a2da38d8..14192e3b 100644 --- a/agb/src/input.rs +++ b/agb/src/input.rs @@ -40,6 +40,7 @@ impl From<(bool, bool)> for Tri { bitflags! { /// Represents a button on the GBA + #[derive(PartialEq, Eq, Hash, Debug, Clone, Copy)] pub struct Button: u32 { /// The A button const A = 1 << 0;