Browse Source

Merge pull request #10 from AzureMarker/master

Update examples so they build
pull/12/head
Meziu 3 years ago committed by GitHub
parent
commit
143164fda0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ctru-rs/examples/buttons.rs
  2. 1
      ctru-rs/examples/hello-both-screens.rs
  3. 1
      ctru-rs/examples/hello-world.rs
  4. 1
      ctru-rs/examples/software-keyboard.rs

1
ctru-rs/examples/buttons.rs

@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad}; @@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad};
fn main() {
// Setup services
ctru::init();
let apt = Apt::init().unwrap();
let hid = Hid::init().unwrap();
let gfx = Gfx::default();

1
ctru-rs/examples/hello-both-screens.rs

@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad}; @@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad};
fn main() {
// Initialize services
ctru::init();
let apt = Apt::init().unwrap();
let hid = Hid::init().unwrap();
let gfx = Gfx::default();

1
ctru-rs/examples/hello-world.rs

@ -9,6 +9,7 @@ fn main() { @@ -9,6 +9,7 @@ fn main() {
// Initialize ctrulib service handles.
// Service handles are internally reference-counted. When all instances of a
// service handle go out of scope, the service will be closed.
ctru::init();
// The APT service handles application management functions, such as enabling sleep
// mode and jumping to the home menu or to other applications

1
ctru-rs/examples/software-keyboard.rs

@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad}; @@ -7,6 +7,7 @@ use ctru::services::hid::{Hid, KeyPad};
use ctru::applets::swkbd::{Swkbd, Button};
fn main() {
ctru::init();
let apt = Apt::init().unwrap();
let hid = Hid::init().unwrap();
let gfx = Gfx::default();

Loading…
Cancel
Save