renderer in connect mod file

This commit is contained in:
Alex Janka 2023-03-02 10:20:50 +11:00
parent 3471148dd5
commit f40268666e
2 changed files with 12 additions and 15 deletions

View file

@ -1,3 +1,13 @@
mod renderer;
pub use crate::processor::memory::mmio::joypad::JoypadState;
pub use renderer::Renderer;
pub trait Renderer {
fn prepare(&mut self, width: usize, height: usize);
fn display(&mut self, buffer: &[u32]);
fn set_title(&mut self, _title: String) {}
fn latest_joypad_state(&mut self) -> JoypadState;
fn set_rumble(&mut self, _rumbling: bool) {}
}

View file

@ -1,13 +0,0 @@
use super::JoypadState;
pub trait Renderer {
fn prepare(&mut self, width: usize, height: usize);
fn display(&mut self, buffer: &[u32]);
fn set_title(&mut self, _title: String) {}
fn latest_joypad_state(&mut self) -> JoypadState;
fn set_rumble(&mut self, _rumbling: bool) {}
}