diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 14:38:25 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-12 14:38:25 +0000 |
commit | 18e40e0f4c45bf204571e548347e23b1bb5b4afd (patch) | |
tree | 81aa6fdc600db2576b6581bc596d09ffb7390cec /apps/player | |
parent | 345920fe7e9d261abf564a71cf9675fbe72679de (diff) |
Make kbd_input() show a cancel splash to indicate user abort better and for better consistency all over the place. Change checking for its return value (style-wise) at some places too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/player')
-rw-r--r-- | apps/player/keyboard.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/player/keyboard.c b/apps/player/keyboard.c index 114b3fdf24..4f8a8b09e5 100644 --- a/apps/player/keyboard.c +++ b/apps/player/keyboard.c @@ -112,6 +112,7 @@ int kbd_input(char* text, int buflen) unsigned char *utf8; int button, lastbutton = 0; + int ret; editpos = utf8length(text); @@ -185,7 +186,7 @@ int kbd_input(char* text, int buflen) switch (button) { case BUTTON_STOP: /* abort */ - return -1; + ret = -1; done = true; break; case BUTTON_MENU: /* page flip */ @@ -245,7 +246,7 @@ int kbd_input(char* text, int buflen) case BUTTON_PLAY | BUTTON_REPEAT: /* accepts what was entered and continues */ - done = true; + ret = 0; done = true; break; case BUTTON_PLAY | BUTTON_REL: @@ -304,6 +305,8 @@ int kbd_input(char* text, int buflen) lastbutton = button; } - return 0; + if (ret < 0) + splash(HZ/2, ID2P(LANG_CANCEL)); + return ret; } |