[gpu] Implement scaling

This commit is contained in:
2024-02-19 12:59:29 +05:30
parent 384359812a
commit b7615368c3
3 changed files with 60 additions and 35 deletions

View File

@@ -1,5 +1,7 @@
use std::array::TryFromSliceError;
use std::fmt::Debug;
use std::io::Error;
use crate::misc::emulator_error::EmulatorError::EmulatorIOError;
#[derive(Debug, Copy, Clone)]
pub enum DeviceType {
@@ -13,11 +15,12 @@ pub enum DeviceType {
GRAPHICS,
}
#[derive(Debug, Clone)]
#[derive(Debug)]
pub enum EmulatorError {
AllocationFailure(DeviceType, &'static str),
UnreachableMemory(DeviceType, u32),
InvalidColor(u8),
EmulatorIOError(Error),
OtherError(String)
}
@@ -27,6 +30,12 @@ impl From<TryFromSliceError> for EmulatorError{
}
}
impl From<std::io::Error> for EmulatorError{
fn from(value: Error) -> Self {
EmulatorIOError(value)
}
}