This commit is contained in:
Vincent Wei
2019-06-12 09:03:09 +08:00
parent 8c81845eba
commit b615321745
5 changed files with 25 additions and 21 deletions
+4 -3
View File
@@ -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
+1 -1
View File
@@ -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
@@ -32,7 +32,7 @@
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
/*
** 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 <libudev.h>
#include <libinput.h>
#include "misc.h"
#include "ial.h"
#include "libinput.h"
#include "ial-libinput.h"
static int mouse_x, mouse_y, mouse_button;
+15 -15
View File
@@ -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 <http://www.gnu.org/licenses/>.
*
*
* 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
* <http://www.minigui.com/en/about/licensing-policy/>.
*/
@@ -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];