From ca1f816e977d36d9eb719ff839f96ffb5cab4624 Mon Sep 17 00:00:00 2001 From: RedInquisitive Date: Sat, 3 Oct 2015 17:30:33 -0500 Subject: [PATCH] Keyboard is less fuzzy and backlight turns off when the keyboard is closed. --- 3DS/source/main.c | 10 +++++++--- PC/include/keyboard.h | 2 +- PC/include/keys.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/3DS/source/main.c b/3DS/source/main.c index b76d011..686a00a 100644 --- a/3DS/source/main.c +++ b/3DS/source/main.c @@ -34,8 +34,8 @@ int main(void) { acInit(); gfxInitDefault(); - gfxSetDoubleBuffering(GFX_TOP, false); - gfxSetDoubleBuffering(GFX_BOTTOM, false); + gfxSetDoubleBuffering(GFX_TOP, true); + gfxSetDoubleBuffering(GFX_BOTTOM, true); if(setjmp(exitJmp)) goto exit; @@ -103,7 +103,11 @@ int main(void) { keyboardActive = !keyboardActive; keyboardToggle = false; - if(keyboardActive) enableBacklight(); + if(keyboardActive) { + enableBacklight(); + } else { + disableBacklight(); + } } } else keyboardToggle = true; diff --git a/PC/include/keyboard.h b/PC/include/keyboard.h index accab67..a69601d 100644 --- a/PC/include/keyboard.h +++ b/PC/include/keyboard.h @@ -3,4 +3,4 @@ extern unsigned char keyboardActive; extern unsigned char keyboardToggle; -inline char currentKeyboardKey(void); +char currentKeyboardKey(void); diff --git a/PC/include/keys.h b/PC/include/keys.h index 7ba9136..8b64fd2 100644 --- a/PC/include/keys.h +++ b/PC/include/keys.h @@ -102,6 +102,6 @@ extern struct cStick cStick; extern struct touch lastTouch; extern struct touch currentTouch; -inline unsigned int mapVirtualKey(unsigned int key); +unsigned int mapVirtualKey(unsigned int key); void simulateKeyNewpress(unsigned int key); void simulateKeyRelease(unsigned int key);