Support full controller input
This commit is contained in:
+8
-8
@@ -10,7 +10,11 @@ use std::{
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use crate::{audio::Audio, renderer::GameRenderer, shrooms_vb_core::CoreVB};
|
||||
use crate::{
|
||||
audio::Audio,
|
||||
renderer::GameRenderer,
|
||||
shrooms_vb_core::{CoreVB, VBKey},
|
||||
};
|
||||
|
||||
pub struct EmulatorBuilder {
|
||||
rom: Option<PathBuf>,
|
||||
@@ -132,11 +136,8 @@ impl Emulator {
|
||||
self.sim.reset();
|
||||
self.running.store(true, Ordering::Release);
|
||||
}
|
||||
EmulatorCommand::PressStart => {
|
||||
self.sim.set_keys(0x1003);
|
||||
}
|
||||
EmulatorCommand::ReleaseStart => {
|
||||
self.sim.set_keys(0x0003);
|
||||
EmulatorCommand::SetKeys(keys) => {
|
||||
self.sim.set_keys(keys);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,8 +150,7 @@ pub enum EmulatorCommand {
|
||||
Pause,
|
||||
Resume,
|
||||
Reset,
|
||||
PressStart,
|
||||
ReleaseStart,
|
||||
SetKeys(VBKey),
|
||||
}
|
||||
|
||||
pub struct EmulatorClient {
|
||||
|
||||
Reference in New Issue
Block a user