Compare commits
No commits in common. "3e95544fb37b427b7bb5c8033c94a1c2c7724078" and "c145bdbd9c02d5917a0df33cd056c9b99b9a9dcc" have entirely different histories.
3e95544fb3
...
c145bdbd9c
3 changed files with 188 additions and 622 deletions
788
Cargo.lock
generated
788
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -10,11 +10,11 @@ resolver = "2"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.4", features = ["derive"] }
|
||||||
image = "0.25"
|
image = "0.24"
|
||||||
ggez = "0.9.3"
|
ggez = "0.9.3"
|
||||||
freetype = { version = "0.7", optional = true }
|
freetype = { version = "0.7", optional = true }
|
||||||
wgpu-types = "0.16"
|
wgpu = "0.16"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = { version = "0.69", optional = true }
|
bindgen = { version = "0.69", optional = true }
|
||||||
|
|
|
@ -9,8 +9,8 @@ use ggez::graphics::{
|
||||||
use ggez::input::keyboard::{self, KeyInput};
|
use ggez::input::keyboard::{self, KeyInput};
|
||||||
use ggez::mint::Vector2;
|
use ggez::mint::Vector2;
|
||||||
use ggez::{Context, GameError, GameResult};
|
use ggez::{Context, GameError, GameResult};
|
||||||
|
use image::io::Reader as ImageReader;
|
||||||
use image::DynamicImage;
|
use image::DynamicImage;
|
||||||
use image::ImageReader;
|
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
|
@ -19,14 +19,14 @@ use std::thread;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
const POLL_TIME: Duration = Duration::from_millis(333);
|
const POLL_TIME: Duration = Duration::from_millis(333);
|
||||||
const INIT_FONT_SIZE_X: f32 = 36.0;
|
const INIT_FONT_SIZE_X: f32 = 24.0;
|
||||||
const INIT_FONT_SIZE_Y: f32 = 51.0;
|
const INIT_FONT_SIZE_Y: f32 = 34.0;
|
||||||
const TEXT_X_OFFSET: f32 = 0.3;
|
const TEXT_X_OFFSET: f32 = 0.3;
|
||||||
const TEXT_OFFSET_Y_SPACING: f32 = 0.4;
|
const TEXT_OFFSET_Y_SPACING: f32 = 0.4;
|
||||||
const TEXT_HEIGHT_SCALE: f32 = 0.12;
|
const TEXT_HEIGHT_SCALE: f32 = 0.1;
|
||||||
const ARTIST_HEIGHT_SCALE: f32 = 0.12;
|
const ARTIST_HEIGHT_SCALE: f32 = 0.08;
|
||||||
const ALBUM_HEIGHT_SCALE: f32 = 0.12;
|
const ALBUM_HEIGHT_SCALE: f32 = 0.08;
|
||||||
const TIMER_HEIGHT_SCALE: f32 = 0.105;
|
const TIMER_HEIGHT_SCALE: f32 = 0.07;
|
||||||
const MIN_WIDTH_RATIO: f32 = 4.0 / 5.0;
|
const MIN_WIDTH_RATIO: f32 = 4.0 / 5.0;
|
||||||
const INCREASE_AMT: f32 = 6.0 / 5.0;
|
const INCREASE_AMT: f32 = 6.0 / 5.0;
|
||||||
const DECREASE_AMT: f32 = 5.0 / 6.0;
|
const DECREASE_AMT: f32 = 5.0 / 6.0;
|
||||||
|
@ -457,7 +457,7 @@ impl MPDDisplay {
|
||||||
let ggez_img = Image::from_pixels(
|
let ggez_img = Image::from_pixels(
|
||||||
ctx,
|
ctx,
|
||||||
rgba8.as_raw(),
|
rgba8.as_raw(),
|
||||||
wgpu_types::TextureFormat::Rgba8UnormSrgb,
|
wgpu::TextureFormat::Rgba8UnormSrgb,
|
||||||
rgba8.width(),
|
rgba8.width(),
|
||||||
rgba8.height(),
|
rgba8.height(),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue