Browse Source

Initialize HID after ir:USER to try and fix New 3DS case

pull/129/head
Mark Drobnak 2 years ago
parent
commit
7f63384aa6
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3
  1. 9
      ctru-rs/examples/ir-user.rs

9
ctru-rs/examples/ir-user.rs

@ -17,15 +17,18 @@ const CPP_POLLING_PERIOD_MS: u8 = 0x32; @@ -17,15 +17,18 @@ const CPP_POLLING_PERIOD_MS: u8 = 0x32;
fn main() {
ctru::init();
let apt = Apt::init().unwrap();
let hid = Hid::init().unwrap();
let gfx = Gfx::init().unwrap();
let top_console = Console::init(gfx.top_screen.borrow_mut());
let bottom_console = Console::init(gfx.bottom_screen.borrow_mut());
let demo = CirclePadProDemo::new(top_console, bottom_console);
demo.print_status_info();
println!("Press A to connect to the CPP");
// Initialize HID after ir:USER because libctru also initializes ir:rst,
// which is mutually exclusive with ir:USER. Initializing HID before ir:USER
// on New 3DS causes ir:USER to not work.
let hid = Hid::init().unwrap();
println!("Press A to connect to the CPP, or Start to exit");
let mut is_connected = false;
while apt.main_loop() {

Loading…
Cancel
Save