diff --git a/cappy3ds/src/capture/katsukitty/mod.rs b/cappy3ds/src/capture/katsukitty/mod.rs index 9f221b0..930c594 100644 --- a/cappy3ds/src/capture/katsukitty/mod.rs +++ b/cappy3ds/src/capture/katsukitty/mod.rs @@ -24,10 +24,18 @@ mod parse; #[folder = "resources/Katsukity/"] struct KatsukityResources; -struct Katsukity { +pub struct Katsukity { } +impl Katsukity { + pub fn new() -> Self { + return Self{ + + }; + } +} + impl Capture for Katsukity { fn connect(context: &mut T) -> Result, SimpleError> { let firmware = KatsukityResources::get("firm.bin").unwrap(); diff --git a/cappy3ds/src/capture/mod.rs b/cappy3ds/src/capture/mod.rs index cb46ff7..f44b978 100644 --- a/cappy3ds/src/capture/mod.rs +++ b/cappy3ds/src/capture/mod.rs @@ -3,7 +3,7 @@ pub mod katsukitty; use simple_error::SimpleError; use rusb::{Device, DeviceDescriptor, DeviceHandle, UsbContext}; -trait Capture { +pub trait Capture { fn connect(context: &mut T) -> Result, SimpleError>; fn open_device( diff --git a/cappy3ds/src/lib.rs b/cappy3ds/src/lib.rs index b7e4d94..d081eae 100644 --- a/cappy3ds/src/lib.rs +++ b/cappy3ds/src/lib.rs @@ -1,5 +1,7 @@ mod capture; +use capture::{Capture, katsukitty::Katsukity}; + use bytes::BytesMut; use rusb::Context; @@ -22,8 +24,10 @@ where } pub fn connect(&mut self) { + let katsukity = capture::katsukitty::Katsukity::new(); + match Context::new() { - Ok(mut context) => match capture::katsukitty::connect(&mut context) { + Ok(mut context) => match Katsukity::connect(&mut context) { Ok(handle) => { self.device_handle = Some(handle); self.usb_context = Some(context); diff --git a/cappy3ds/src/main.rs b/cappy3ds/src/main.rs index 6f8e6a3..f6ba30d 100644 --- a/cappy3ds/src/main.rs +++ b/cappy3ds/src/main.rs @@ -2,5 +2,5 @@ mod capture; fn main() { //capture::katsukitty::do_capture(); - capture::loopy::do_capture(); + //capture::loopy::do_capture(); }