aboutsummaryrefslogtreecommitdiff
path: root/examples/src/bin/hello-both-screens.rs
diff options
context:
space:
mode:
authorFenrir <[email protected]>2018-02-06 23:06:43 -0700
committerFenrirWolf <[email protected]>2018-02-06 23:17:14 -0700
commitfc0e124f4390deba03193d277dd4fe93ae5443a3 (patch)
tree8cdfccf5658381cb66256068cff7a4994385c0f8 /examples/src/bin/hello-both-screens.rs
parentFix unsoundness in Console's API (diff)
downloadctru-rs-fc0e124f4390deba03193d277dd4fe93ae5443a3.tar.xz
ctru-rs-fc0e124f4390deba03193d277dd4fe93ae5443a3.zip
Use bitflags 1.0 for button presses
Diffstat (limited to 'examples/src/bin/hello-both-screens.rs')
-rw-r--r--examples/src/bin/hello-both-screens.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/src/bin/hello-both-screens.rs b/examples/src/bin/hello-both-screens.rs
index 627d9b0..1c214e9 100644
--- a/examples/src/bin/hello-both-screens.rs
+++ b/examples/src/bin/hello-both-screens.rs
@@ -3,7 +3,7 @@ extern crate ctru;
use ctru::gfx::{Gfx, Screen};
use ctru::console::Console;
use ctru::services::apt::Apt;
-use ctru::services::hid::{self, Hid};
+use ctru::services::hid::{Hid, KeyPad};
fn main() {
// Initialize services
@@ -12,11 +12,11 @@ fn main() {
let mut gfx = Gfx::default();
// Start a console on the top screen
- let mut top_screen = Console::init(Screen::Top);
+ let top_screen = Console::init(Screen::Top);
// Start a console on the bottom screen.
// The most recently initialized console will be active by default
- let mut bottom_screen = Console::init(Screen::Bottom);
+ let bottom_screen = Console::init(Screen::Bottom);
// Let's print on the top screen first
top_screen.select();
@@ -35,7 +35,7 @@ fn main() {
gfx.swap_buffers();
hid.scan_input();
- if hid.keys_down().contains(hid::KEY_START) {
+ if hid.keys_down().contains(KeyPad::KEY_START) {
break;
}
}