first somewhat working version of uw8 using gpu window

This commit is contained in:
2022-07-08 23:29:39 +02:00
parent b0adf7748d
commit 9dabf75732
5 changed files with 927 additions and 248 deletions

View File

@@ -3,6 +3,17 @@ use std::time::Instant;
use crate::Framebuffer;
use minifb::{Key, Window, WindowOptions};
static GAMEPAD_KEYS: &[Key] = &[
Key::Up,
Key::Down,
Key::Left,
Key::Right,
Key::Z,
Key::X,
Key::A,
Key::S,
];
pub fn run(mut update: Box<dyn FnMut(&mut dyn Framebuffer, u32, bool) -> Instant + 'static>) -> ! {
#[cfg(target_os = "windows")]
unsafe {