summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-09-17 00:27:10 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-09-17 00:27:10 +0200
commit3d815406f49e22c492b9e0d4c18d457144fa7ca7 (patch)
treeb0a567ea98887b88a5cdcee89b160d22c64a33f2
parenta486ee4fb8fa7676bfb23adddc9cd5986a0e680d (diff)
downloadrockbox-3d815406f49e22c492b9e0d4c18d457144fa7ca7.tar.gz
rockbox-3d815406f49e22c492b9e0d4c18d457144fa7ca7.tar.bz2
rockbox-3d815406f49e22c492b9e0d4c18d457144fa7ca7.zip
Don't call touchscreen functions when we don't have a touchscreen
Change-Id: Ia8c05f45c289729031d6333445d932bb5ac242ca
-rw-r--r--firmware/target/arm/imx233/debug-imx233.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c
index f65d881ea3..bfc38b20dc 100644
--- a/firmware/target/arm/imx233/debug-imx233.c
+++ b/firmware/target/arm/imx233/debug-imx233.c
@@ -1091,7 +1091,9 @@ bool dbg_hw_info_button(void)
int vddio_val = orig_vddio_val;
int vddio_brownout = orig_vddio_brownout;
#endif
+#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(TOUCHSCREEN_POINT);
+#endif
while(1)
{
@@ -1115,14 +1117,18 @@ bool dbg_hw_info_button(void)
imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout);
#endif
lcd_setfont(FONT_UI);
+#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
+#endif
return true;
case ACT_CANCEL:
#if IMX233_SUBTARGET >= 3700
imx233_power_set_regulator(REGULATOR_VDDIO, orig_vddio_val, orig_vddio_brownout);
#endif
lcd_setfont(FONT_UI);
+#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
+#endif
return false;
}
@@ -1483,8 +1489,10 @@ bool dbg_hw_info(void)
int len = ARRAYLEN(debug_screens);
int top_visible = 0;
int highlight = 0;
+#ifdef HAVE_TOUCHSCREEN
enum touchscreen_mode old_mode = touchscreen_get_mode();
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
+#endif
while(1)
{
int button = my_get_action(HZ / 10);
@@ -1503,7 +1511,9 @@ bool dbg_hw_info(void)
lcd_setfont(FONT_UI);
break;
case ACT_CANCEL:
+#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(old_mode);
+#endif
return false;
}
// adjust top visible if needed
@@ -1534,7 +1544,9 @@ bool dbg_hw_info(void)
lcd_update();
yield();
}
+#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(old_mode);
+#endif
return false;
}