From f41d7f169d752c658cbbf3044f57d865d544632a Mon Sep 17 00:00:00 2001 From: mincomk Date: Mon, 2 Jun 2025 17:52:11 +0900 Subject: [PATCH] fix: assets --- .cargo/config.toml | 7 +++++++ src/enums.rs | 1 + src/graphic.rs | 20 ++++---------------- src/graphic/buffer.rs | 1 + 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 81bf23b..239d81c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,3 +3,10 @@ target = "x86_64-unknown-uefi" [target.x86_64-unknown-uefi] runner = "bootuefi" + +[unstable] +build-std = ["core", "compiler_builtins"] +build-std-features = ["compiler-builtins-mem"] + +[toolchain] +channel = "nightly" diff --git a/src/enums.rs b/src/enums.rs index ed94b44..1d49a20 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -1,4 +1,5 @@ #[derive(Debug, Clone)] +#[allow(dead_code)] pub enum MediaType { VideoGIF, ImagePNG, diff --git a/src/graphic.rs b/src/graphic.rs index 92a83d9..524d5db 100644 --- a/src/graphic.rs +++ b/src/graphic.rs @@ -1,34 +1,22 @@ -use alloc::sync::Arc; use buffer::Buffer; -use spin::Mutex; use uefi::{ Result, - boot::{self, ScopedProtocol}, + boot::{self}, proto::console::gop::GraphicsOutput, }; use crate::{ - codec::{ - image::ImageData, - transform::{Transformer, crop::CropTransformer}, - video::VideoData, - }, + codec::{image::ImageData, transform::crop::CropTransformer, video::VideoData}, util::time::Microseconds, }; pub mod buffer; -pub struct GraphicLoader { - gop: Arc>>>, - resolution: Arc>>, -} +pub struct GraphicLoader {} impl GraphicLoader { pub fn new() -> Self { - Self { - gop: Arc::new(Mutex::new(None)), - resolution: Arc::new(Mutex::new(None)), - } + Self {} } pub fn render(&self, data: &ImageData) -> Result { diff --git a/src/graphic/buffer.rs b/src/graphic/buffer.rs index 296e5ac..95dff4e 100644 --- a/src/graphic/buffer.rs +++ b/src/graphic/buffer.rs @@ -12,6 +12,7 @@ pub struct Buffer { pixels: Vec, } +#[allow(dead_code)] impl Buffer { pub fn new(width: usize, height: usize) -> Self { Buffer {