From 6c33c51a4ca9907d23e3154d956fd6781122f492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Sun, 19 Sep 2004 21:58:37 +0000 Subject: Redesigned the button handling. The code now uses symbolic function defines instead of checking for specific buttons. This makes it easier to add support for new devices with different button layouts. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5091 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'apps/playlist.c') diff --git a/apps/playlist.c b/apps/playlist.c index 5725c4be85..ecdb45c104 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -564,11 +564,7 @@ static int add_directory_to_playlist(struct playlist_info* playlist, for (i=0; i 0) { /* user abort */ -#if defined(HAVE_PLAYER_KEYPAD) || defined(HAVE_NEO_KEYPAD) || defined(HAVE_ONDIO_KEYPAD) - if (button_get(false) == BUTTON_STOP) -#else - if (button_get(false) == BUTTON_OFF) -#endif + if (button_get(false) == SETTINGS_CANCEL) break; if (temp_buf[0] != '#' && temp_buf[0] != '\0') @@ -2384,11 +2376,7 @@ int playlist_save(struct playlist_info* playlist, char *filename) int seek; /* user abort */ -#if defined(HAVE_PLAYER_KEYPAD) || defined(HAVE_NEO_KEYPAD) || defined(HAVE_ONDIO_KEYPAD) - if (button_get(false) == BUTTON_STOP) -#else - if (button_get(false) == BUTTON_OFF) -#endif + if (button_get(false) == SETTINGS_CANCEL) break; control_file = playlist->indices[index] & PLAYLIST_INSERT_TYPE_MASK; -- cgit v1.2.3