aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput/ginput_mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ginput/ginput_mouse.c')
-rw-r--r--src/ginput/ginput_mouse.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c
index 58abfce2..f60faccb 100644
--- a/src/ginput/ginput_mouse.c
+++ b/src/ginput/ginput_mouse.c
@@ -23,8 +23,16 @@
#define CALIBRATION_MINPRESS_PERIOD 300 // milliseconds
#define CALIBRATION_MAXPRESS_PERIOD 5000 // milliseconds
-#define CALIBRATION_FONT "* Double"
-#define CALIBRATION_FONT2 "* Narrow"
+#ifdef GINPUT_TOUCH_CALIBRATION_FONT1
+ #define CALIBRATION_FONT1 GINPUT_TOUCH_CALIBRATION_FONT1
+#else
+ #define CALIBRATION_FONT1 "* Double"
+#endif
+#ifdef GINPUT_TOUCH_CALIBRATION_FONT2
+ #define CALIBRATION_FONT2 GINPUT_TOUCH_CALIBRATION_FONT2
+#else
+ #define CALIBRATION_FONT2 "* Narrow"
+#endif
#define CALIBRATION_BACKGROUND Blue
#define CALIBRATION_CROSS_COLOR1 White
@@ -32,13 +40,21 @@
#define CALIBRATION_CROSS_INNERGAP 2
#define CALIBRATION_CROSS_RADIUS 15
-#define CALIBRATION_TITLE "Calibration"
+#ifdef GINPUT_TOUCH_CALIBRATION_TITLE
+ #define CALIBRATION_TITLE GINPUT_TOUCH_CALIBRATION_TITLE
+#else
+ #define CALIBRATION_TITLE "Calibration"
+#endif
#define CALIBRATION_TITLE_Y 5
#define CALIBRATION_TITLE_HEIGHT 30
#define CALIBRATION_TITLE_COLOR White
#define CALIBRATION_TITLE_BACKGROUND Blue
-#define CALIBRATION_ERROR_TEXT "Calibration Failed!"
+#ifdef GINPUT_TOUCH_CALIBRATION_ERROR
+ #define CALIBRATION_ERROR_TEXT GINPUT_TOUCH_CALIBRATION_ERROR
+#else
+ #define CALIBRATION_ERROR_TEXT "Calibration Failed!"
+#endif
#define CALIBRATION_ERROR_DELAY 3000
#define CALIBRATION_ERROR_COLOR Red
#define CALIBRATION_ERROR_BACKGROUND Yellow
@@ -60,7 +76,7 @@ static GTIMER_DECL(MouseTimer);
x = (coord_t) (c->ax * pt->x + c->bx * pt->y + c->cx);
y = (coord_t) (c->ay * pt->x + c->by * pt->y + c->cy);
-
+
pt->x = x;
pt->y = y;
}
@@ -455,7 +471,7 @@ static void MousePoll(void *param) {
#endif
#if GDISP_NEED_TEXT
- font1 = gdispOpenFont(CALIBRATION_FONT);
+ font1 = gdispOpenFont(CALIBRATION_FONT1);
if (!font1) font1 = gdispOpenFont("*");
font2 = gdispOpenFont(CALIBRATION_FONT2);
if (!font2) font2 = gdispOpenFont("*");