summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-09-19 03:26:59 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-09-19 03:26:59 +0000
commit2939d1548e657b3438fd80ed7a0e9010a5e92b9a (patch)
tree449734e5f838f5032f99b57fae94b5663a7beb2c /legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c
parent308f4b0c22dabff87ef902f9175b76438219b47e (diff)
fmting.
SVN revision: 52455
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c
index 161c200ec8..888a18ee90 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb_ps2.c
@@ -19,18 +19,18 @@ ecore_fb_ps2_init(void)
19 if (_ecore_fb_ps2_fd >= 0) 19 if (_ecore_fb_ps2_fd >= 0)
20 { 20 {
21 prev_flags = fcntl(_ecore_fb_ps2_fd, F_GETFL); 21 prev_flags = fcntl(_ecore_fb_ps2_fd, F_GETFL);
22 fcntl(_ecore_fb_ps2_fd, F_SETFL, prev_flags | O_NONBLOCK); 22 fcntl(_ecore_fb_ps2_fd, F_SETFL, prev_flags | O_NONBLOCK);
23 _ecore_fb_ts_fd_handler_handle = ecore_main_fd_handler_add(_ecore_fb_ps2_fd, 23 _ecore_fb_ts_fd_handler_handle = ecore_main_fd_handler_add(_ecore_fb_ps2_fd,
24 ECORE_FD_READ, 24 ECORE_FD_READ,
25 _ecore_fb_ps2_fd_handler, NULL, NULL, NULL); 25 _ecore_fb_ps2_fd_handler, NULL, NULL, NULL);
26 if (!_ecore_fb_ts_fd_handler_handle) 26 if (!_ecore_fb_ts_fd_handler_handle)
27 { 27 {
28 close(_ecore_fb_ps2_fd); 28 close(_ecore_fb_ps2_fd);
29 return 0; 29 return 0;
30 } 30 }
31 return 1; 31 return 1;
32 } 32 }
33 return 0; 33 return 0;
34} 34}
35 35
36void 36void
@@ -47,7 +47,7 @@ _ecore_fb_ps2_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U
47 static double last_time = 0; 47 static double last_time = 0;
48 static double last_last_time = 0; 48 static double last_last_time = 0;
49 int v = 0; 49 int v = 0;
50 50
51 do 51 do
52 { 52 {
53 int x, y, button, i; 53 int x, y, button, i;
@@ -66,13 +66,13 @@ _ecore_fb_ps2_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U
66 t = ecore_time_get(); 66 t = ecore_time_get();
67 _ecore_fb_ps2_event_byte_count = 0; 67 _ecore_fb_ps2_event_byte_count = 0;
68 if (_ecore_fb_ps2_event.button & 0x10) 68 if (_ecore_fb_ps2_event.button & 0x10)
69 x = prev_x + (0xffffff00 | _ecore_fb_ps2_event.x); 69 x = prev_x + (0xffffff00 | _ecore_fb_ps2_event.x);
70 else 70 else
71 x = prev_x + _ecore_fb_ps2_event.x; 71 x = prev_x + _ecore_fb_ps2_event.x;
72 if (_ecore_fb_ps2_event.button & 0x20) 72 if (_ecore_fb_ps2_event.button & 0x20)
73 y = prev_y - (0xffffff00 | _ecore_fb_ps2_event.y); 73 y = prev_y - (0xffffff00 | _ecore_fb_ps2_event.y);
74 else 74 else
75 y = prev_y - _ecore_fb_ps2_event.y; 75 y = prev_y - _ecore_fb_ps2_event.y;
76 button = _ecore_fb_ps2_event.button & 0x7; 76 button = _ecore_fb_ps2_event.button & 0x7;
77 if (x < 0) x = 0; 77 if (x < 0) x = 0;
78 if (y < 0) y = 0; 78 if (y < 0) y = 0;
@@ -107,7 +107,7 @@ _ecore_fb_ps2_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __U
107 e->y = y; 107 e->y = y;
108 e->button = 1; 108 e->button = 1;
109 if ((t - last_time) <= _ecore_fb_double_click_time) 109 if ((t - last_time) <= _ecore_fb_double_click_time)
110 e->double_click = 1; 110 e->double_click = 1;
111 if ((t - last_last_time) <= (2 * _ecore_fb_double_click_time)) 111 if ((t - last_last_time) <= (2 * _ecore_fb_double_click_time))
112 { 112 {
113 did_triple = 1; 113 did_triple = 1;