Basic output system
This commit is contained in:
@ -7,5 +7,6 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.82"
|
||||
minifb_host = { path = "../minifb_host" }
|
||||
player = { path = "../player" }
|
||||
viperid = { path = "../.." }
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use viperid::VResult;
|
||||
use viperid::{Device, VResult};
|
||||
|
||||
use crate::go_builder::GoBuilder;
|
||||
|
||||
@ -10,14 +10,15 @@ fn main() -> VResult<()> {
|
||||
let builder = GoBuilder::new(
|
||||
&PathBuf::from("example_project"))?;
|
||||
let wasm = builder.build()?;
|
||||
let mut executor = player::Executor::new(&wasm)?;
|
||||
let device = Device::new();
|
||||
|
||||
while executor.is_running() {
|
||||
println!("update started");
|
||||
let mut executor = player::Executor::new(device.share(), &wasm)?;
|
||||
|
||||
minifb_host::host(device, || {
|
||||
executor.update();
|
||||
println!("update completed");
|
||||
executor.get_error()?;
|
||||
}
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user