diff --git a/build.Dockerfile b/build.Dockerfile index 3ded8f8..03b712f 100644 --- a/build.Dockerfile +++ b/build.Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && \ ln -s $(which ld64.lld-20) /usr/bin/ld64.lld && \ SDK_VERSION=14.5 UNATTENDED=1 ENABLE_COMPILER_RT_INSTALL=1 TARGET_DIR=/osxcross ./build.sh -FROM rust:1.89-bookworm +FROM rust:1.90-bookworm ADD --chmod=644 "https://apt.llvm.org/llvm-snapshot.gpg.key" /etc/apt/trusted.gpg.d/apt.llvm.org.asc COPY llvm.sources /etc/apt/sources.list.d/llvm.sources RUN rustup target add x86_64-pc-windows-msvc && \ diff --git a/build.rs b/build.rs index befe091..551c09a 100644 --- a/build.rs +++ b/build.rs @@ -21,6 +21,7 @@ fn main() -> Result<(), Box> { .include(Path::new("shrooms-vb-core/util")) .opt_level(opt_level) .flag_if_supported("-fno-strict-aliasing") + .define("_CRT_SECURE_NO_WARNINGS", None) .define("VB_LITTLE_ENDIAN", None) .define("VB_SIGNED_PROPAGATE", None) .define("VB_DIV_GENERIC", None) diff --git a/src/input.rs b/src/input.rs index 220e9ba..2712d71 100644 --- a/src/input.rs +++ b/src/input.rs @@ -457,12 +457,6 @@ struct PersistedGamepadMapping { default_axes: Vec<(Code, (VBKey, VBKey))>, } -#[derive(Serialize, Deserialize)] -pub struct Shortcut { - pub shortcut: KeyboardShortcut, - pub command: Command, -} - #[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)] pub enum Command { OpenRom, diff --git a/src/memory.rs b/src/memory.rs index aa73d4f..1b4cc86 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -50,11 +50,11 @@ impl MemoryClient { } fn aligned_memory(start: u32, length: usize) -> BoxBytes { - if start % 4 == 0 && length % 4 == 0 { + if start.is_multiple_of(4) && length.is_multiple_of(4) { let memory = vec![0u32; length / 4].into_boxed_slice(); return bytemuck::box_bytes_of(memory); } - if start % 2 == 0 && length % 2 == 0 { + if start.is_multiple_of(2) && length.is_multiple_of(2) { let memory = vec![0u16; length / 2].into_boxed_slice(); return bytemuck::box_bytes_of(memory); } diff --git a/src/window/vip/chardata.rs b/src/window/vip/chardata.rs index 334b487..61e3960 100644 --- a/src/window/vip/chardata.rs +++ b/src/window/vip/chardata.rs @@ -274,12 +274,6 @@ impl AppWindow for CharacterDataWindow { } } -#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] -enum CharDataResource { - Character { palette: Palette, index: usize }, - CharacterData { palette: Palette }, -} - #[derive(Clone, Default, PartialEq, Eq)] struct CharDataParams { palette: Palette,