|
|
|
@ -1,7 +1,6 @@
@@ -1,7 +1,6 @@
|
|
|
|
|
extern crate ctru; |
|
|
|
|
|
|
|
|
|
use ctru::console::Console; |
|
|
|
|
use ctru::gfx::Screen; |
|
|
|
|
use ctru::services::hid::KeyPad; |
|
|
|
|
use ctru::services::{Apt, Hid}; |
|
|
|
|
use ctru::Gfx; |
|
|
|
@ -11,7 +10,7 @@ fn main() {
@@ -11,7 +10,7 @@ fn main() {
|
|
|
|
|
let apt = Apt::init().unwrap(); |
|
|
|
|
let hid = Hid::init().unwrap(); |
|
|
|
|
let gfx = Gfx::default(); |
|
|
|
|
let _console = Console::init(&gfx, Screen::Top); |
|
|
|
|
let mut _console = Console::init(gfx.top_screen.borrow_mut()); |
|
|
|
|
|
|
|
|
|
println!("Press A to enable/disable wide screen mode."); |
|
|
|
|
|
|
|
|
@ -23,7 +22,13 @@ fn main() {
@@ -23,7 +22,13 @@ fn main() {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if hid.keys_down().contains(KeyPad::KEY_A) { |
|
|
|
|
gfx.set_wide_mode(!gfx.get_wide_mode()); |
|
|
|
|
drop(_console); |
|
|
|
|
|
|
|
|
|
let wide_mode = gfx.top_screen.borrow().get_wide_mode(); |
|
|
|
|
gfx.top_screen.borrow_mut().set_wide_mode(!wide_mode); |
|
|
|
|
|
|
|
|
|
_console = Console::init(gfx.top_screen.borrow_mut()); |
|
|
|
|
println!("Press A to enable/disable wide screen mode."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gfx.flush_buffers(); |