summaryrefslogtreecommitdiff
path: root/utils/nwztools/plattools/test_bl.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-10-26 20:40:53 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2016-10-26 20:46:57 +0200
commit794104dd17a28a2db09ca1ed44ba7dfb18a1f0ca (patch)
treea872c56f765c61623a6ddf90914f0d1647b70bf7 /utils/nwztools/plattools/test_bl.c
parentd42b43c7860aacafbce97cccb3b2f19ad8812d56 (diff)
downloadrockbox-794104dd17a28a2db09ca1ed44ba7dfb18a1f0ca.tar.gz
rockbox-794104dd17a28a2db09ca1ed44ba7dfb18a1f0ca.zip
nwztools/plattools: switch to BACK key to quit
The power off/option does not exist on some models. Change-Id: Ifb45293b3b3faa96d9fece2340cbd98299a4a0b7
Diffstat (limited to 'utils/nwztools/plattools/test_bl.c')
-rw-r--r--utils/nwztools/plattools/test_bl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/nwztools/plattools/test_bl.c b/utils/nwztools/plattools/test_bl.c
index b70f81b957..f97162fc4f 100644
--- a/utils/nwztools/plattools/test_bl.c
+++ b/utils/nwztools/plattools/test_bl.c
@@ -24,10 +24,10 @@ int main(int argc, char **argv)
24{ 24{
25 /* clear screen and display welcome message */ 25 /* clear screen and display welcome message */
26 nwz_lcdmsg(true, 0, 0, "test_bl"); 26 nwz_lcdmsg(true, 0, 0, "test_bl");
27 nwz_lcdmsg(false, 0, 2, "UP/DOWN: level"); 27 nwz_lcdmsg(false, 0, 2, "LEFT/RIGHT: level");
28 nwz_lcdmsg(false, 0, 3, "LEFT/RIGHT: step"); 28 nwz_lcdmsg(false, 0, 3, "UP/DOWN: step");
29 nwz_lcdmsg(false, 0, 4, "VOL UP/DOWN: period"); 29 nwz_lcdmsg(false, 0, 4, "VOL UP/DOWN: period");
30 nwz_lcdmsg(false, 0, 5, "PWR OFF: quit"); 30 nwz_lcdmsg(false, 0, 5, "BACK: quit");
31 /* open input and framebuffer device */ 31 /* open input and framebuffer device */
32 int input_fd = nwz_key_open(); 32 int input_fd = nwz_key_open();
33 if(input_fd < 0) 33 if(input_fd < 0)
@@ -65,25 +65,25 @@ int main(int argc, char **argv)
65 /* only act on release */ 65 /* only act on release */
66 if(press) 66 if(press)
67 continue; 67 continue;
68 if(code == NWZ_KEY_OPTION) 68 if(code == NWZ_KEY_BACK)
69 break; /* quit */ 69 break; /* quit */
70 bool change_bl = false; 70 bool change_bl = false;
71 if(code == NWZ_KEY_UP && bl.level < NWZ_FB_BL_MAX_LEVEL) 71 if(code == NWZ_KEY_RIGHT && bl.level < NWZ_FB_BL_MAX_LEVEL)
72 { 72 {
73 change_bl = true; 73 change_bl = true;
74 bl.level++; 74 bl.level++;
75 } 75 }
76 else if(code == NWZ_KEY_DOWN && bl.level > NWZ_FB_BL_MIN_LEVEL) 76 else if(code == NWZ_KEY_LEFT && bl.level > NWZ_FB_BL_MIN_LEVEL)
77 { 77 {
78 change_bl = true; 78 change_bl = true;
79 bl.level--; 79 bl.level--;
80 } 80 }
81 else if(code == NWZ_KEY_RIGHT && bl.step < NWZ_FB_BL_MAX_STEP) 81 else if(code == NWZ_KEY_UP && bl.step < NWZ_FB_BL_MAX_STEP)
82 { 82 {
83 change_bl = true; 83 change_bl = true;
84 bl.step++; 84 bl.step++;
85 } 85 }
86 else if(code == NWZ_KEY_LEFT && bl.step > NWZ_FB_BL_MIN_STEP) 86 else if(code == NWZ_KEY_DOWN && bl.step > NWZ_FB_BL_MIN_STEP)
87 { 87 {
88 change_bl = true; 88 change_bl = true;
89 bl.step--; 89 bl.step--;