Skip to content

Commit

Permalink
Quick build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DDRBoxman committed Oct 29, 2023
1 parent 11ef3fe commit 6b949a3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
10 changes: 9 additions & 1 deletion cappy3ds/src/capture/katsukitty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: UsbContext>(context: &mut T) -> Result<DeviceHandle<T>, SimpleError> {
let firmware = KatsukityResources::get("firm.bin").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion cappy3ds/src/capture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pub mod katsukitty;
use simple_error::SimpleError;
use rusb::{Device, DeviceDescriptor, DeviceHandle, UsbContext};

trait Capture {
pub trait Capture {
fn connect<T: UsbContext>(context: &mut T) -> Result<DeviceHandle<T>, SimpleError>;

fn open_device<T: UsbContext>(
Expand Down
6 changes: 5 additions & 1 deletion cappy3ds/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod capture;

use capture::{Capture, katsukitty::Katsukity};

use bytes::BytesMut;
use rusb::Context;

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion cappy3ds/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ mod capture;

fn main() {
//capture::katsukitty::do_capture();
capture::loopy::do_capture();
//capture::loopy::do_capture();
}

0 comments on commit 6b949a3

Please sign in to comment.