[kbd] Implement keyboard and adapter
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use std::sync::mpsc::SendError;
|
||||
use std::sync::PoisonError;
|
||||
use sdl2::IntegerOrSdlError;
|
||||
use sdl2::video::WindowBuildError;
|
||||
use crate::device::keyboard::KeyboardEvent;
|
||||
|
||||
pub type EmulatorResult<T> = Result<T, EmulatorError>;
|
||||
|
||||
@@ -43,3 +45,9 @@ impl<T> From<PoisonError<T>> for EmulatorError{
|
||||
Self::MutexInvalidState(value.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<SendError<KeyboardEvent>> for EmulatorError{
|
||||
fn from(value: SendError<KeyboardEvent>) -> Self {
|
||||
Self::IOError(format!("Failed to communicate keyboard stats to main thread: {}",value))
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user