Browse Source

Add ir:rst disable in CPP demo to improve New 3DS compatibility

pull/86/head
AzureMarker 1 year ago
parent
commit
de1604b364
  1. 8
      ctru-rs/examples/ir-user-circle-pad-pro.rs

8
ctru-rs/examples/ir-user-circle-pad-pro.rs

@ -9,6 +9,7 @@ use ctru::services::svc::HandleExt; @@ -9,6 +9,7 @@ use ctru::services::svc::HandleExt;
use ctru_sys::Handle;
use std::time::Duration;
// Configuration for this demo of the Circle Pad Pro (not general purpose ir:USER values).
const PACKET_INFO_SIZE: usize = 8;
const MAX_PACKET_SIZE: usize = 32;
const PACKET_COUNT: usize = 1;
@ -16,6 +17,13 @@ const PACKET_BUFFER_SIZE: usize = PACKET_COUNT * (PACKET_INFO_SIZE + MAX_PACKET_ @@ -16,6 +17,13 @@ const PACKET_BUFFER_SIZE: usize = PACKET_COUNT * (PACKET_INFO_SIZE + MAX_PACKET_
const CPP_CONNECTION_POLLING_PERIOD_MS: u8 = 0x08;
const CPP_POLLING_PERIOD_MS: u8 = 0x32;
// This export tells libctru to not initialize ir:rst when initializing HID.
// This is necessary on the New 3DS because ir:rst is mutually exclusive with ir:USER.
#[no_mangle]
unsafe extern "C" fn hidShouldUseIrrst() -> bool {
false
}
fn main() {
let apt = Apt::new().unwrap();
let gfx = Gfx::new().unwrap();

Loading…
Cancel
Save