Keyboard is less fuzzy and backlight turns off when the keyboard is closed.

This commit is contained in:
RedInquisitive 2015-10-03 17:30:33 -05:00
parent d51123dce4
commit ca1f816e97
3 changed files with 9 additions and 5 deletions

View file

@ -34,8 +34,8 @@ int main(void) {
acInit(); acInit();
gfxInitDefault(); gfxInitDefault();
gfxSetDoubleBuffering(GFX_TOP, false); gfxSetDoubleBuffering(GFX_TOP, true);
gfxSetDoubleBuffering(GFX_BOTTOM, false); gfxSetDoubleBuffering(GFX_BOTTOM, true);
if(setjmp(exitJmp)) goto exit; if(setjmp(exitJmp)) goto exit;
@ -103,7 +103,11 @@ int main(void) {
keyboardActive = !keyboardActive; keyboardActive = !keyboardActive;
keyboardToggle = false; keyboardToggle = false;
if(keyboardActive) enableBacklight(); if(keyboardActive) {
enableBacklight();
} else {
disableBacklight();
}
} }
} }
else keyboardToggle = true; else keyboardToggle = true;

View file

@ -3,4 +3,4 @@
extern unsigned char keyboardActive; extern unsigned char keyboardActive;
extern unsigned char keyboardToggle; extern unsigned char keyboardToggle;
inline char currentKeyboardKey(void); char currentKeyboardKey(void);

View file

@ -102,6 +102,6 @@ extern struct cStick cStick;
extern struct touch lastTouch; extern struct touch lastTouch;
extern struct touch currentTouch; extern struct touch currentTouch;
inline unsigned int mapVirtualKey(unsigned int key); unsigned int mapVirtualKey(unsigned int key);
void simulateKeyNewpress(unsigned int key); void simulateKeyNewpress(unsigned int key);
void simulateKeyRelease(unsigned int key); void simulateKeyRelease(unsigned int key);