mirror of
https://github.com/transistorfet/moa.git
synced 2024-05-28 13:41:30 +00:00
Added image scaling for minifb
This commit is contained in:
parent
a87aab9b70
commit
418bf2f141
|
@ -9,8 +9,8 @@ use moa::system::System;
|
|||
use moa::host::traits::{Host, JoystickDevice, JoystickUpdater, WindowUpdater};
|
||||
|
||||
|
||||
const WIDTH: usize = 640;
|
||||
const HEIGHT: usize = 360;
|
||||
const WIDTH: usize = 320;
|
||||
const HEIGHT: usize = 224;
|
||||
|
||||
pub struct MiniFrontend {
|
||||
pub buffer: Mutex<Vec<u32>>,
|
||||
|
@ -53,11 +53,14 @@ impl MiniFrontend {
|
|||
|
||||
//pub fn start(&self) {
|
||||
pub fn start(&self, mut system: System) {
|
||||
let mut options = minifb::WindowOptions::default();
|
||||
options.scale = minifb::Scale::X4;
|
||||
|
||||
let mut window = minifb::Window::new(
|
||||
"Test - ESC to exit",
|
||||
WIDTH,
|
||||
HEIGHT,
|
||||
minifb::WindowOptions::default(),
|
||||
options,
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
panic!("{}", e);
|
||||
|
|
Loading…
Reference in New Issue
Block a user