Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
xserver
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Trevisan
xserver
Commits
598c5d54
Commit
598c5d54
authored
Nov 06, 2003
by
Matthew Allum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tslib improvements
parent
7e1a564c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
25 deletions
+81
-25
hw/kdrive/fbdev/Makefile.am
hw/kdrive/fbdev/Makefile.am
+5
-6
hw/kdrive/linux/tslib.c
hw/kdrive/linux/tslib.c
+38
-12
hw/kdrive/mach64/Makefile.am
hw/kdrive/mach64/Makefile.am
+10
-2
hw/kdrive/mga/Makefile.am
hw/kdrive/mga/Makefile.am
+7
-1
hw/kdrive/r128/Makefile.am
hw/kdrive/r128/Makefile.am
+7
-1
hw/kdrive/smi/Makefile.am
hw/kdrive/smi/Makefile.am
+6
-1
hw/kdrive/vesa/Makefile.am
hw/kdrive/vesa/Makefile.am
+8
-2
No files found.
hw/kdrive/fbdev/Makefile.am
View file @
598c5d54
...
...
@@ -6,17 +6,16 @@ noinst_LIBRARIES = libfbdev.a
bin_PROGRAMS
=
Xfbdev
if
TSLIB
TSLIB_FLAG
=
-lts
endif
libfbdev_a_SOURCES
=
\
fbdev.c
Xfbdev_SOURCES
=
\
fbinit.c
if
TSLIB
TSLIB_FLAG
=
-lts
endif
Xfbdev_LDADD
=
\
libfbdev.a
\
@KDRIVE_LIBS@
\
...
...
@@ -25,5 +24,5 @@ Xfbdev_LDADD = \
Xfbdev_DEPENDENCIES
=
\
libfbdev.a
\
@KDRIVE_LIBS@
@KDRIVE_LIBS@
hw/kdrive/linux/tslib.c
View file @
598c5d54
...
...
@@ -62,19 +62,27 @@
static
long
lastx
=
0
,
lasty
=
0
;
static
struct
tsdev
*
tsDev
=
NULL
;
void
/* extern int TSLibWantRawData; */
int
KdTsPhyScreen
=
0
;
static
void
TsRead
(
int
tsPort
,
void
*
closure
)
{
KdMouseInfo
*
mi
=
closure
;
int
fd
=
(
int
)
mi
->
driver
;
struct
ts_sample
event
;
int
n
;
long
pressure
;
long
x
,
y
;
unsigned
long
flags
;
unsigned
long
buttons
;
/*
if (TSLibWantRawData)
n = ts_read_raw(tsDev, &event, 1);
else
*/
n
=
ts_read
(
tsDev
,
&
event
,
1
);
if
(
n
==
1
)
{
if
(
event
.
pressure
)
...
...
@@ -85,7 +93,7 @@ TsRead (int tsPort, void *closure)
* touch screen, if it is we send absolute coordinates. If not,
* then we send delta's so that we can track the entire vga screen.
*/
if
(
Kd
Ts
CurScreen
==
KdTsPhyScreen
)
{
if
(
KdCurScreen
==
KdTsPhyScreen
)
{
flags
=
KD_BUTTON_1
;
x
=
event
.
x
;
y
=
event
.
y
;
...
...
@@ -108,11 +116,13 @@ TsRead (int tsPort, void *closure)
lastx
=
0
;
lasty
=
0
;
}
KdEnqueueMouseEvent
(
mi
,
flags
,
x
,
y
);
}
}
static
char
*
TsNames
[]
=
{
NULL
,
"/dev/ts"
,
"/dev/touchscreen/0"
,
};
...
...
@@ -121,12 +131,14 @@ static char *TsNames[] = {
int
TsInputType
;
int
static
int
TslibEnable
(
int
not_needed_fd
,
void
*
closure
)
{
KdMouseInfo
*
mi
=
closure
;
int
fd
=
0
;
fprintf
(
stderr
,
"%s() called
\n
"
,
__func__
);
if
(
!
(
tsDev
=
ts_open
(
mi
->
name
,
0
)))
{
fprintf
(
stderr
,
"%s() failed to open %s
\n
"
,
__func__
,
mi
->
name
);
return
-
1
;
/* XXX Not sure what to return here */
...
...
@@ -138,16 +150,16 @@ TslibEnable (int not_needed_fd, void *closure)
return
fd
;
}
void
static
void
TslibDisable
(
int
fd
,
void
*
closure
)
{
ts_close
(
tsDev
);
}
int
static
int
TslibInit
(
void
)
{
int
i
;
int
i
,
j
=
0
;
KdMouseInfo
*
mi
,
*
next
;
int
fd
=
0
;
int
n
=
0
;
...
...
@@ -161,10 +173,17 @@ TslibInit (void)
if
(
mi
->
inputType
)
continue
;
/* Check for tslib env var device setting */
if
((
TsNames
[
0
]
=
getenv
(
"TSLIB_TSDEVICE"
))
==
NULL
)
j
++
;
if
(
!
mi
->
name
)
{
for
(
i
=
0
;
i
<
NUM_TS_NAMES
;
i
++
)
for
(
i
=
j
;
i
<
NUM_TS_NAMES
;
i
++
)
{
/* XXX Should check for */
if
(
!
(
tsDev
=
ts_open
(
TsNames
[
i
],
0
)))
continue
;
ts_config
(
tsDev
);
fd
=
ts_fd
(
tsDev
);
...
...
@@ -195,11 +214,18 @@ TslibInit (void)
}
else
if
(
fd
>
0
)
close
(
fd
);
{
fprintf
(
stderr
,
"%s() failed to open tslib
\n
"
,
__func__
);
if
(
fd
>
0
)
close
(
fd
);
}
}
return
n
;
}
void
static
void
TslibFini
(
void
)
{
KdMouseInfo
*
mi
;
...
...
hw/kdrive/mach64/Makefile.am
View file @
598c5d54
...
...
@@ -5,6 +5,11 @@ INCLUDES = \
bin_PROGRAMS
=
Xmach64
if
TSLIB
TSLIB_FLAG
=
-lts
endif
noinst_LIBRARIES
=
libmach64.a
libmach64_a_SOURCES
=
\
...
...
@@ -20,11 +25,14 @@ Xmach64_SOURCES = \
MACH64_LIBS
=
\
libmach64.a
\
$(top_builddir)
/hw/kdrive/vesa/libvesa.a
$(top_builddir)
/hw/kdrive/vesa/libvesa.a
Xmach64_LDADD
=
\
$(MACH64_LIBS)
\
@KDRIVE_LIBS@
\
@XSERVER_LIBS@
@XSERVER_LIBS@
\
$(TSLIB_FLAG)
Xmach64_DEPENDENCIES
=
$(MACH64_LIBS)
@KDRIVE_LIBS@
hw/kdrive/mga/Makefile.am
View file @
598c5d54
...
...
@@ -7,6 +7,10 @@ bin_PROGRAMS = Xmga
noinst_LIBRARIES
=
libmga.a
if
TSLIB
TSLIB_FLAG
=
-lts
endif
libmga_a_SOURCES
=
\
mgadraw.c
\
mga.c
\
...
...
@@ -19,4 +23,6 @@ Xmga_LDADD = \
libmga.a
\
$(top_builddir)
/hw/kdrive/vesa/libvesa.a
\
@KDRIVE_LIBS@
\
@XSERVER_LIBS@
@XSERVER_LIBS@
\
$(TSLIB_FLAG)
hw/kdrive/r128/Makefile.am
View file @
598c5d54
...
...
@@ -5,6 +5,10 @@ INCLUDES = \
bin_PROGRAMS
=
Xr128
if
TSLIB
TSLIB_FLAG
=
-lts
endif
noinst_LIBRARIES
=
libr128.a
libr128_a_SOURCES
=
\
...
...
@@ -19,4 +23,6 @@ Xr128_LDADD = \
libr128.a
\
$(top_builddir)
/hw/kdrive/vesa/libvesa.a
\
@KDRIVE_LIBS@
\
@XSERVER_LIBS@
@XSERVER_LIBS@
\
$(TSLIB_FLAG)
hw/kdrive/smi/Makefile.am
View file @
598c5d54
...
...
@@ -6,6 +6,10 @@ INCLUDES = \
bin_PROGRAMS
=
Xsmi
if
TSLIB
TSLIB_FLAG
=
-lts
endif
noinst_LIBRARIES
=
libsmi.a
# smivideo.c # not ready yet
...
...
@@ -22,4 +26,5 @@ Xsmi_LDADD = \
$(top_builddir)
/hw/kdrive/fbdev/libfbdev.a
\
$(top_builddir)
/hw/kdrive/vesa/libvesa.a
\
@KDRIVE_LIBS@
\
@XSERVER_LIBS@
@XSERVER_LIBS@
\
$(TSLIB_FLAG)
hw/kdrive/vesa/Makefile.am
View file @
598c5d54
...
...
@@ -6,6 +6,11 @@ noinst_LIBRARIES = libvesa.a
bin_PROGRAMS
=
Xvesa
if
TSLIB
TSLIB_FLAG
=
-lts
endif
libvesa_a_SOURCES
=
\
vesa.c
\
vbe.c
\
...
...
@@ -18,8 +23,9 @@ Xvesa_SOURCES = \
Xvesa_LDADD
=
\
libvesa.a
\
@KDRIVE_LIBS@
\
@XSERVER_LIBS@
@XSERVER_LIBS@
\
$(TSLIB_FLAG)
Xvesa_DEPENDENCIES
=
\
libvesa.a
\
libvesa.a
\
@KDRIVE_LIBS@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment