fixups for split of ferretro_base/_components
This commit is contained in:
parent
fad4954b2a
commit
570129c834
|
@ -15,7 +15,7 @@ num_enum = "^0.4"
|
|||
ffmpeg-next = "4.3.8"
|
||||
rand = "0.8.4"
|
||||
#ferretro-recorder = { git = "ssh://git@vvn.space:2222/cinnabon/ferretro-recorder.git", branch = "main" }
|
||||
ferretro = { path = "../rustro" }
|
||||
ferretro_base = { path = "../rustro/ferretro_base" }
|
||||
ferretro-recorder = { path = "../ferretro-recorder" }
|
||||
#ferretro = { git = "ssh://git@vvn.space:2222/cinnabon/rustro.git", branch = "viv/ffmpeg2" }
|
||||
structopt = "^0.3"
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::{pin::Pin, sync::{Arc, Mutex}};
|
|||
use rand::distributions::{Distribution, Standard};
|
||||
use crossbeam_channel::SendError;
|
||||
use failure::Fallible;
|
||||
use ferretro::retro::constants::{InputIndex, JoypadButton};
|
||||
use ferretro_base::prelude::*;
|
||||
use ferretro_recorder::{driver::{AnalogRequest, AnalogVector, Axes, Command, Driver, MemoryOverwriter}, emulator_runner::RecordedEmulator, inputs::Inputs};
|
||||
|
||||
pub fn dk_behavior(emu: Arc<Mutex<Pin<Box<RecordedEmulator<()>>>>>, mut driver: Driver) -> Result<(), SendError<Command>> {
|
||||
|
|
35
src/main.rs
35
src/main.rs
|
@ -1,4 +1,4 @@
|
|||
extern crate ferretro;
|
||||
extern crate ferretro_base;
|
||||
extern crate ferretro_recorder;
|
||||
extern crate ffmpeg_next as ffmpeg;
|
||||
extern crate rand;
|
||||
|
@ -15,9 +15,8 @@ use std::thread;
|
|||
use ferretro_recorder::driver::Driver;
|
||||
use num_enum::IntoPrimitive;
|
||||
|
||||
use ferretro::retro;
|
||||
use ferretro::retro::constants::{AnalogAxis, InputIndex, JoypadButton};
|
||||
use ferretro::retro::wrapped_types::InputDeviceId;
|
||||
|
||||
use ferretro_base::prelude::*;
|
||||
use ferretro_recorder::emulator_runner::RecordedEmulator;
|
||||
use mammut::apps::{AppBuilder, Scopes};
|
||||
use mammut::{Data, Mastodon, MediaBuilder, Registration, StatusBuilder};
|
||||
|
@ -131,8 +130,8 @@ fn dk_input_callback(emu: &mut RecordedEmulator<DKState>, port: u32, device: Inp
|
|||
match port {
|
||||
0 | 1 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => 0x7FFF,
|
||||
retro::constants::AnalogAxis::Y => -0x7FFF,
|
||||
AnalogAxis::X => 0x7FFF,
|
||||
AnalogAxis::Y => -0x7FFF,
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
|
@ -221,15 +220,15 @@ fn dk_input_callback(emu: &mut RecordedEmulator<DKState>, port: u32, device: Inp
|
|||
match port {
|
||||
0 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => -0x7FFF,
|
||||
retro::constants::AnalogAxis::Y => 0x0000,
|
||||
AnalogAxis::X => -0x7FFF,
|
||||
AnalogAxis::Y => 0x0000,
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
1 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => 0x7FFF,
|
||||
retro::constants::AnalogAxis::Y => 0x0000,
|
||||
AnalogAxis::X => 0x7FFF,
|
||||
AnalogAxis::Y => 0x0000,
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
|
@ -243,15 +242,15 @@ fn dk_input_callback(emu: &mut RecordedEmulator<DKState>, port: u32, device: Inp
|
|||
match port {
|
||||
0 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => 0x3000,
|
||||
retro::constants::AnalogAxis::Y => 0x0000,
|
||||
AnalogAxis::X => 0x3000,
|
||||
AnalogAxis::Y => 0x0000,
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
1 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => -0x3000,
|
||||
retro::constants::AnalogAxis::Y => 0x0000,
|
||||
AnalogAxis::X => -0x3000,
|
||||
AnalogAxis::Y => 0x0000,
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
|
@ -292,8 +291,8 @@ fn dk_input_callback(emu: &mut RecordedEmulator<DKState>, port: u32, device: Inp
|
|||
match port {
|
||||
0 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => 0x0000,
|
||||
retro::constants::AnalogAxis::Y => 0x6000, // crouch
|
||||
AnalogAxis::X => 0x0000,
|
||||
AnalogAxis::Y => 0x6000, // crouch
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
|
@ -313,8 +312,8 @@ fn dk_input_callback(emu: &mut RecordedEmulator<DKState>, port: u32, device: Inp
|
|||
match port {
|
||||
0 => match device {
|
||||
InputDeviceId::Analog(axis) => match axis {
|
||||
retro::constants::AnalogAxis::X => 0x0000,
|
||||
retro::constants::AnalogAxis::Y => 0x6000, // crouch
|
||||
AnalogAxis::X => 0x0000,
|
||||
AnalogAxis::Y => 0x6000, // crouch
|
||||
},
|
||||
_ => 0
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue