diff --git a/configure.ac b/configure.ac
index d1e36eb3..08409fe5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -894,7 +894,7 @@ CheckDRM()
enable_video_drm=$enableval)
if test "x$enable_video_drm" = "xyes"; then
PKG_CHECK_MODULES(DRM, [libudev >= 200, libdrm >= 2.4], video_drm="yes",
- video_drm="no; Linux DRM NEWGAL engine requires libdrm and libudev")
+ video_drm="no; Linux DRM NEWGAL engine requires libdrm 2.4+ and libudev 200+")
if test "x$video_drm" = "xyes"; then
AC_DEFINE(_MGGAL_DRM, 1,
[Define if include Linux DRM NEWGAL engine])
@@ -1918,12 +1918,13 @@ if test "x$build_tslib_ial_engine" = "xyes"; then
fi
if test "x$build_libinput_ial_engine" = "xyes"; then
- PKG_CHECK_MODULES(LIBINPUT, [libinput >= 1.10.0], ,
- build_libinput_ial_engine="no; the IAL engine requires libinput 1.13.0 or later")
+ PKG_CHECK_MODULES(LIBINPUT, [libudev >= 200, libinput >= 1.10.0], ,
+ build_libinput_ial_engine="no; Libinput IAL engine requires libinput 1.13.0+ and libudev 200+")
if test "x$build_libinput_ial_engine" = "xyes"; then
AC_DEFINE(_MGIAL_LIBINPUT, 1,
[Define if include Linux libinput IAL engine])
need_udev="yes"
+ DEP_LIBS="$DEP_LIBS -linput"
else
AC_MSG_WARN([$build_libinput_ial_engine])
fi
diff --git a/src/ial/Makefile.am b/src/ial/Makefile.am
index 49cff7ec..da1df749 100644
--- a/src/ial/Makefile.am
+++ b/src/ial/Makefile.am
@@ -49,7 +49,7 @@ MSTAR_SRCS = mstarial.h mstarial.c
DFB_SRCS = dfb.h dfb.c
USVFB_SRCS = usvfbinput.c usvfbinput.h
-LIBINPUT_SRCS = libinput.c libinput.h
+LIBINPUT_SRCS = ial-libinput.c ial-libinput.h
if MGIAL_CONSOLE
native_libial_la_LIBADD = native/libnative.la
diff --git a/src/ial/libinput.c b/src/ial/ial-libinput.c
similarity index 95%
rename from src/ial/libinput.c
rename to src/ial/ial-libinput.c
index 8783cadf..a17f8128 100644
--- a/src/ial/libinput.c
+++ b/src/ial/ial-libinput.c
@@ -32,7 +32,7 @@
* .
*/
/*
-** libinput.c: The implementation of the IAL engine based on libinput.
+** ial-libinput.c: The implementation of the IAL engine based on libinput.
**
** Created by Wei Yongming, 2019/06/10
*/
@@ -45,9 +45,12 @@
#ifdef _MGIAL_LIBINPUT
+#include
+#include
+
#include "misc.h"
#include "ial.h"
-#include "libinput.h"
+#include "ial-libinput.h"
static int mouse_x, mouse_y, mouse_button;
diff --git a/src/ial/libinput.h b/src/ial/ial-libinput.h
similarity index 100%
rename from src/ial/libinput.h
rename to src/ial/ial-libinput.h
diff --git a/src/ial/ial.c b/src/ial/ial.c
index 63bd4ae0..104dfbd6 100644
--- a/src/ial/ial.c
+++ b/src/ial/ial.c
@@ -1,33 +1,33 @@
/*
- * This file is part of MiniGUI, a mature cross-platform windowing
+ * This file is part of MiniGUI, a mature cross-platform windowing
* and Graphics User Interface (GUI) support system for embedded systems
* and smart IoT devices.
- *
+ *
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
* Copyright (C) 1998~2002, WEI Yongming
- *
+ *
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
- *
+ *
* Or,
- *
+ *
* As this program is a library, any link to this program must follow
* GNU General Public License version 3 (GPLv3). If you cannot accept
* GPLv3, you need to be licensed from FMSoft.
- *
+ *
* If you have got a commercial license of this program, please use it
* under the terms and conditions of the commercial license.
- *
+ *
* For more information about the commercial license, please refer to
* .
*/
@@ -118,13 +118,13 @@
#include "usvfbinput.h"
#endif
#ifdef _MGIAL_LIBINPUT
- #include "libinput.h"
+ #include "ial-libinput.h"
#endif
#define LEN_ENGINE_NAME 16
#define LEN_MTYPE_NAME 16
-static INPUT inputs [] =
+static INPUT inputs [] =
{
/* General IAL engines ... */
#ifdef _MGIAL_QVFB
@@ -313,7 +313,7 @@ void GUIAPI GetOriginalMousePosition (int* x, int* y)
#define LSHIFT(x) ((x)<<10)
#define RSHIFT(x) ((x)>>12)
-static int vars1 [NR_EQUATIONS], vars2 [NR_EQUATIONS],
+static int vars1 [NR_EQUATIONS], vars2 [NR_EQUATIONS],
vars3 [NR_EQUATIONS], vars4 [NR_EQUATIONS];
static void do_mouse_calibrate (int* x, int* y)
@@ -336,7 +336,7 @@ static void do_mouse_calibrate (int* x, int* y)
*y = RSHIFT (y1 + y2 + y3 + y4);
}
-static BOOL
+static BOOL
doGaussianElimination (int* x, const POINT* src_pts, const POINT* dst_pts)
{
int x12, x23, y12, y23, nx12, nx23, ny12, ny23;
@@ -365,7 +365,7 @@ doGaussianElimination (int* x, const POINT* src_pts, const POINT* dst_pts)
numerator = nx12*x23 - nx23*x12;
x [1] = LSHIFT (numerator) / denominator2;
x [2] = LSHIFT (dst_pts [0].x) - x [0] * src_pts [0].x - x [1] * src_pts [0].y;
-
+
numerator = ny12*y23 - ny23*y12;
x [3] = LSHIFT (numerator) / denominator1;
numerator = ny12*x23 - ny23*x12;
@@ -375,7 +375,7 @@ doGaussianElimination (int* x, const POINT* src_pts, const POINT* dst_pts)
return TRUE;
}
-BOOL GUIAPI
+BOOL GUIAPI
SetMouseCalibrationParameters (const POINT* src_pts, const POINT* dst_pts)
{
POINT my_src_pts [3];