From 9b986524c067fe447fb79f241c97db09924b18b0 Mon Sep 17 00:00:00 2001 From: Kjell Ericson Date: Mon, 13 Jan 2003 12:54:59 +0000 Subject: [PATCH] Moving the keyboard buffer empty routine to pure simulator code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3077 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 2 ++ apps/tree.c | 13 ------------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/apps/main.c b/apps/main.c index b69275be7f..fd9b3760bf 100644 --- a/apps/main.c +++ b/apps/main.c @@ -77,6 +77,8 @@ void init(void) global_settings.loudness, global_settings.bass_boost, global_settings.avc ); + while (button_get(false) != 0) + ; /* Empty the keyboard buffer */ } #else diff --git a/apps/tree.c b/apps/tree.c index a8d72f4488..dcaa9558bd 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -511,21 +511,8 @@ bool ask_resume(void) #endif lcd_update(); -#ifdef SIMULATOR - { - /* Special code for SIMULATOR because it might return the - "enter"-keyrelease of the shell when starting the simulator. */ - unsigned short key; - do { - key=button_get(true); - if (key == BUTTON_PLAY) - return true; - } while (key & BUTTON_REL); - } -#else if (button_get(true) == BUTTON_PLAY) return true; -#endif return false; }