From 43b7dd32e053d4830b4702b86ace3f8c19f86db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Tue, 1 Aug 2023 20:18:08 +0100 Subject: [PATCH] chore: cleanup --- .github/workflows/deploy.yml | 7 +-- .github/workflows/issue.yml | 2 +- frontends/libretro/src/consts.rs | 60 +++++++++---------- .../react/components/audio-gb/audio-gb.css | 5 ++ .../react/components/tiles-gb/tiles-gb.css | 5 ++ src/apu.rs | 2 +- src/devices/mod.rs | 6 +- src/gen/mock.rs | 42 ++++++------- src/gen/mod.rs | 48 +++++++-------- 9 files changed, 92 insertions(+), 85 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6d6acdcb..267c5c25 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,9 +36,6 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: files: | - target/debug/libboytacean.so - target/release/libboytacean.so - target/debug/boytacean-sdl target/release/boytacean-sdl - target/debug/libboytacean-libretro.so - target/release/libboytacean-libretro.so + target/release/libboytacean.so + target/release/libboytacean_libretro.so diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index 9cc6816f..9b738d3b 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -2,7 +2,7 @@ name: Issue Assignment on: issues: types: [opened] -jobs: +jobs: auto-assign: name: Auto Assign runs-on: ubuntu-latest diff --git a/frontends/libretro/src/consts.rs b/frontends/libretro/src/consts.rs index 4dd880b8..9b35e0e2 100644 --- a/frontends/libretro/src/consts.rs +++ b/frontends/libretro/src/consts.rs @@ -1,30 +1,30 @@ -pub const RETRO_API_VERSION: u32 = 1; -pub const REGION_NTSC: u32 = 0; - -pub const RETRO_ENVIRONMENT_SET_PIXEL_FORMAT: u32 = 10; - -pub const RETRO_PIXEL_FORMAT_0RGB1555: usize = 0; -pub const RETRO_PIXEL_FORMAT_XRGB8888: usize = 1; -pub const RETRO_PIXEL_FORMAT_RGB565: usize = 2; - -pub const RETRO_MEMORY_SAVE_RAM: u32 = 0; -pub const RETRO_MEMORY_SYSTEM_RAM: u32 = 0; - -pub const RETRO_DEVICE_JOYPAD: usize = 1; - -pub const RETRO_DEVICE_ID_JOYPAD_B: isize = 0; -pub const RETRO_DEVICE_ID_JOYPAD_Y: isize = 1; -pub const RETRO_DEVICE_ID_JOYPAD_SELECT: isize = 2; -pub const RETRO_DEVICE_ID_JOYPAD_START: isize = 3; -pub const RETRO_DEVICE_ID_JOYPAD_UP: isize = 4; -pub const RETRO_DEVICE_ID_JOYPAD_DOWN: isize = 5; -pub const RETRO_DEVICE_ID_JOYPAD_LEFT: isize = 6; -pub const RETRO_DEVICE_ID_JOYPAD_RIGHT: isize = 7; -pub const RETRO_DEVICE_ID_JOYPAD_A: isize = 8; -pub const RETRO_DEVICE_ID_JOYPAD_X: isize = 9; -pub const RETRO_DEVICE_ID_JOYPAD_L: isize = 10; -pub const RETRO_DEVICE_ID_JOYPAD_R: isize = 11; -pub const RETRO_DEVICE_ID_JOYPAD_L2: isize = 12; -pub const RETRO_DEVICE_ID_JOYPAD_R2: isize = 13; -pub const RETRO_DEVICE_ID_JOYPAD_L3: isize = 14; -pub const RETRO_DEVICE_ID_JOYPAD_R3: isize = 15; +pub const RETRO_API_VERSION: u32 = 1; +pub const REGION_NTSC: u32 = 0; + +pub const RETRO_ENVIRONMENT_SET_PIXEL_FORMAT: u32 = 10; + +pub const RETRO_PIXEL_FORMAT_0RGB1555: usize = 0; +pub const RETRO_PIXEL_FORMAT_XRGB8888: usize = 1; +pub const RETRO_PIXEL_FORMAT_RGB565: usize = 2; + +pub const RETRO_MEMORY_SAVE_RAM: u32 = 0; +pub const RETRO_MEMORY_SYSTEM_RAM: u32 = 0; + +pub const RETRO_DEVICE_JOYPAD: usize = 1; + +pub const RETRO_DEVICE_ID_JOYPAD_B: isize = 0; +pub const RETRO_DEVICE_ID_JOYPAD_Y: isize = 1; +pub const RETRO_DEVICE_ID_JOYPAD_SELECT: isize = 2; +pub const RETRO_DEVICE_ID_JOYPAD_START: isize = 3; +pub const RETRO_DEVICE_ID_JOYPAD_UP: isize = 4; +pub const RETRO_DEVICE_ID_JOYPAD_DOWN: isize = 5; +pub const RETRO_DEVICE_ID_JOYPAD_LEFT: isize = 6; +pub const RETRO_DEVICE_ID_JOYPAD_RIGHT: isize = 7; +pub const RETRO_DEVICE_ID_JOYPAD_A: isize = 8; +pub const RETRO_DEVICE_ID_JOYPAD_X: isize = 9; +pub const RETRO_DEVICE_ID_JOYPAD_L: isize = 10; +pub const RETRO_DEVICE_ID_JOYPAD_R: isize = 11; +pub const RETRO_DEVICE_ID_JOYPAD_L2: isize = 12; +pub const RETRO_DEVICE_ID_JOYPAD_R2: isize = 13; +pub const RETRO_DEVICE_ID_JOYPAD_L3: isize = 14; +pub const RETRO_DEVICE_ID_JOYPAD_R3: isize = 15; diff --git a/frontends/web/react/components/audio-gb/audio-gb.css b/frontends/web/react/components/audio-gb/audio-gb.css index 7d2b365f..f0bb4cd1 100644 --- a/frontends/web/react/components/audio-gb/audio-gb.css +++ b/frontends/web/react/components/audio-gb/audio-gb.css @@ -24,6 +24,11 @@ .audio-gb > .section > .audio-wave.disabled { opacity: 0.6; + -o-opacity: 0.6; + -ms-opacity: 0.6; + -moz-opacity: 0.6; + -khtml-opacity: 0.6; + -webkit-opacity: 0.6; } .audio-gb > .section > .audio-wave > h4 { diff --git a/frontends/web/react/components/tiles-gb/tiles-gb.css b/frontends/web/react/components/tiles-gb/tiles-gb.css index 3b9783ea..ce0dd2be 100644 --- a/frontends/web/react/components/tiles-gb/tiles-gb.css +++ b/frontends/web/react/components/tiles-gb/tiles-gb.css @@ -2,6 +2,11 @@ background-color: #000000; border: 2px solid #58b09c; border-radius: 8px 8px 8px 8px; + -o-border-radius: 8px 8px 8px 8px; + -ms-border-radius: 8px 8px 8px 8px; + -moz-border-radius: 8px 8px 8px 8px; + -khtml-border-radius: 8px 8px 8px 8px; + -webkit-border-radius: 8px 8px 8px 8px; padding: 8px 8px 8px 8px; } diff --git a/src/apu.rs b/src/apu.rs index 94906908..5d119612 100644 --- a/src/apu.rs +++ b/src/apu.rs @@ -102,7 +102,7 @@ pub struct Apu { sampling_rate: u16, /// The number of audion channels that are going to be - /// outputted as part fo the audio buffer) + /// outputted as part fo the audio buffer) channels: u8, /// Internal sequencer counter that runs at 512Hz diff --git a/src/devices/mod.rs b/src/devices/mod.rs index 339782b8..167a1acf 100644 --- a/src/devices/mod.rs +++ b/src/devices/mod.rs @@ -1,3 +1,3 @@ -pub mod buffer; -pub mod printer; -pub mod stdout; +pub mod buffer; +pub mod printer; +pub mod stdout; diff --git a/src/gen/mock.rs b/src/gen/mock.rs index e27fd34f..d8856d86 100644 --- a/src/gen/mock.rs +++ b/src/gen/mock.rs @@ -1,21 +1,21 @@ -//! Global constants, such as compiler version used, features, platform information and others. - -pub const COMPILATION_DATE: &str = "-"; -pub const COMPILATION_TIME: &str = "-"; -pub const NAME: &str = "-"; -pub const VERSION: &str = "x.x.x"; -pub const COMPILER: &str = "rustc"; -pub const COMPILER_VERSION: &str = "x.x.x"; -pub const HOST: &str = "-"; -pub const TARGET: &str = "-"; -pub const PROFILE: &str = "-"; -pub const OPT_LEVEL: &str = "-"; -pub const MAKEFLAGS: &str = "-"; -pub const FEATURES_SEQ: [&str; 1] = ["cpu"]; -pub const PLATFORM_CPU_BITS: &str = "64"; -pub const PLATFORM_CPU_BITS_INT: usize = 64; - -pub const FEATURES: [&str; 0] = []; -pub const FEATURES_STR: &str = r""; -pub const DEPENDENCIES: [(&str, &str); 0] = []; -pub const DEPENDENCIES_STR: &str = r""; +//! Global constants, such as compiler version used, features, platform information and others. + +pub const COMPILATION_DATE: &str = "-"; +pub const COMPILATION_TIME: &str = "-"; +pub const NAME: &str = "-"; +pub const VERSION: &str = "x.x.x"; +pub const COMPILER: &str = "rustc"; +pub const COMPILER_VERSION: &str = "x.x.x"; +pub const HOST: &str = "-"; +pub const TARGET: &str = "-"; +pub const PROFILE: &str = "-"; +pub const OPT_LEVEL: &str = "-"; +pub const MAKEFLAGS: &str = "-"; +pub const FEATURES_SEQ: [&str; 1] = ["cpu"]; +pub const PLATFORM_CPU_BITS: &str = "64"; +pub const PLATFORM_CPU_BITS_INT: usize = 64; + +pub const FEATURES: [&str; 0] = []; +pub const FEATURES_STR: &str = r""; +pub const DEPENDENCIES: [(&str, &str); 0] = []; +pub const DEPENDENCIES_STR: &str = r""; diff --git a/src/gen/mod.rs b/src/gen/mod.rs index 61da6075..806338f1 100644 --- a/src/gen/mod.rs +++ b/src/gen/mod.rs @@ -1,24 +1,24 @@ -//! Constants that define the current build and execution environment. - -use std::collections::HashMap; - -#[cfg(feature = "gen-mock")] -pub mod mock; -#[cfg(feature = "gen-mock")] -pub use self::mock::*; - -#[rustfmt::skip] -#[cfg(not(feature = "gen-mock"))] -pub mod build; -#[cfg(not(feature = "gen-mock"))] -pub use self::build::*; - -#[rustfmt::skip] -#[cfg(not(feature = "gen-mock"))] -pub mod _build; -#[cfg(not(feature = "gen-mock"))] -pub use self::_build::*; - -pub fn dependencies_map() -> HashMap<&'static str, &'static str> { - HashMap::from(DEPENDENCIES) -} +//! Constants that define the current build and execution environment. + +use std::collections::HashMap; + +#[cfg(feature = "gen-mock")] +pub mod mock; +#[cfg(feature = "gen-mock")] +pub use self::mock::*; + +#[rustfmt::skip] +#[cfg(not(feature = "gen-mock"))] +pub mod build; +#[cfg(not(feature = "gen-mock"))] +pub use self::build::*; + +#[rustfmt::skip] +#[cfg(not(feature = "gen-mock"))] +pub mod _build; +#[cfg(not(feature = "gen-mock"))] +pub use self::_build::*; + +pub fn dependencies_map() -> HashMap<&'static str, &'static str> { + HashMap::from(DEPENDENCIES) +} -- GitLab