summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2018-02-25 01:51:18 +0100
committerSebastian Leonhardt <sebastian.leonhardt@web.de>2018-04-03 14:58:34 +0200
commit7a12e796a62b916dae5de1b2986e8cb11ac5be4c (patch)
tree8ae9001d78fc9ca0bb94e451cdaac7fe9da1ba09
parent0486e5b93e422d0bd240439f02a8509a6c5bcbc5 (diff)
downloadrockbox-7a12e79.tar.gz
rockbox-7a12e79.zip
Oscilloscope plugin: bundle #define NEED_LASTBUTTON to a single place
This fixes a warning that was introduced with enabling plugins for the Zen XFi-2. Change-Id: I8fe9a4be301f2c4643d04ae42d2189e62c191592
-rw-r--r--apps/plugins/oscilloscope.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index 345a161b66..07c40c2b4e 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -63,7 +63,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_OFF
@@ -79,7 +78,6 @@
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
#define OSCILLOSCOPE_RC_QUIT BUTTON_RC_STOP
-#define NEED_LASTBUTTON
#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
@@ -122,7 +120,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_SCROLL_FWD
#define OSCILLOSCOPE_VOL_DOWN BUTTON_SCROLL_BACK
-#define NEED_LASTBUTTON
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
#define OSCILLOSCOPE_QUIT (BUTTON_HOME|BUTTON_REPEAT)
@@ -139,7 +136,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_SCROLL_FWD
#define OSCILLOSCOPE_VOL_DOWN BUTTON_SCROLL_BACK
-#define NEED_LASTBUTTON
#elif (CONFIG_KEYPAD == SANSA_C200_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -166,7 +162,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
/* Not enough plugin RAM for waveform view */
#elif (CONFIG_KEYPAD == SANSA_M200_PAD)
@@ -196,7 +191,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -213,7 +207,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_SCROLL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_SCROLL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
#define OSCILLOSCOPE_QUIT BUTTON_BACK
@@ -240,7 +233,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
#define OSCILLOSCOPE_QUIT BUTTON_RC_REC
@@ -257,7 +249,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_RC_REW
#define OSCILLOSCOPE_VOL_UP BUTTON_RC_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_RC_VOL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == COWON_D2_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -277,7 +268,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == CREATIVE_ZENXFI3_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -291,7 +281,6 @@
#define OSCILLOSCOPE_PAUSE (BUTTON_PLAY | BUTTON_REL)
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -306,7 +295,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -321,7 +309,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == PHILIPS_SA9200_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -336,7 +323,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_PREV
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == ONDAVX747_PAD
#define OSCILLOSCOPE_QUIT BUTTON_POWER
@@ -361,7 +347,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == SAMSUNG_YH820_PAD
#define OSCILLOSCOPE_QUIT BUTTON_REW
@@ -388,7 +373,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_NEXT
#define OSCILLOSCOPE_VOL_UP BUTTON_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_DOWN
-#define NEED_LASTBUTTON
#elif CONFIG_KEYPAD == MPIO_HD200_PAD
#define OSCILLOSCOPE_QUIT (BUTTON_REC | BUTTON_PLAY)
@@ -439,7 +423,6 @@
#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT
#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP
#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN
-#define NEED_LASTBUTTON
#elif (CONFIG_KEYPAD == SAMSUNG_YPR0_PAD)
#define OSCILLOSCOPE_QUIT BUTTON_BACK
@@ -547,9 +530,13 @@
#ifndef OSCILLOSCOPE_VOL_DOWN
#define OSCILLOSCOPE_VOL_DOWN BUTTON_BOTTOMRIGHT
#endif
-#define NEED_LASTBUTTON
#endif /* HAVE_TOUCHSCREEN */
+#if defined(OSCILLOSCOPE_DRAWMODE_PRE) || defined(OSCILLOSCOPE_ORIENTATION_PRE) \
+ || defined(OSCILLOSCOPE_GRAPHMODE_PRE) || defined(OSCILLOSCOPE_PAUSE_PRE)
+#define NEED_LASTBUTTON
+#endif
+
/* colours */
#if LCD_DEPTH > 1
#ifdef HAVE_LCD_COLOR