From cbdd9d26c3360a1ed4842c3132b3eb5f37d02c98 Mon Sep 17 00:00:00 2001
From: Andrea Ciliberti <meziu210@icloud.com>
Date: Thu, 13 Jan 2022 10:55:41 +0100
Subject: [PATCH] Require Gfx instance for Console::init

---
 ctru-rs/src/console.rs | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/ctru-rs/src/console.rs b/ctru-rs/src/console.rs
index d7ab478..986a7e2 100644
--- a/ctru-rs/src/console.rs
+++ b/ctru-rs/src/console.rs
@@ -2,7 +2,7 @@ use std::default::Default;
 
 use ctru_sys::{consoleClear, consoleInit, consoleSelect, consoleSetWindow, PrintConsole};
 
-use crate::gfx::Screen;
+use crate::gfx::{Gfx, Screen};
 
 pub struct Console {
     context: Box<PrintConsole>,
@@ -12,7 +12,7 @@ impl Console {
     /// Initialize a console on the chosen screen, overwriting whatever was on the screen
     /// previously (including other consoles). The new console is automatically selected for
     /// printing.
-    pub fn init(screen: Screen) -> Self {
+    pub fn init(_gfx: &Gfx, screen: Screen) -> Self {
         let mut context = Box::new(PrintConsole::default());
 
         unsafe { consoleInit(screen.into(), context.as_mut()) };
@@ -45,12 +45,6 @@ impl Console {
     }
 }
 
-impl Default for Console {
-    fn default() -> Self {
-        Console::init(Screen::Top)
-    }
-}
-
 impl Drop for Console {
     fn drop(&mut self) {
         static mut EMPTY_CONSOLE: PrintConsole = unsafe { const_zero::const_zero!(PrintConsole) };