[gpu] Implement scaling
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user