more input devices checks.

SVN revision: 32782
This commit is contained in:
Carsten Haitzler 2007-11-19 23:16:29 +00:00
parent 3a64b46646
commit e935c1a0d7
1 changed files with 56 additions and 51 deletions

View File

@ -261,12 +261,13 @@ _ecore_evas_fb_init(int w, int h)
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init(); if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
/* register all input devices */ /* register all input devices */
input_dir = opendir("/dev/input/"); input_dir = opendir("/dev/input/");
if(!input_dir) return _ecore_evas_init_count; if (!input_dir) return _ecore_evas_init_count;
ecore_evas_input_devices = ecore_list_new(); ecore_evas_input_devices = ecore_list_new();
while((input_entry = readdir(input_dir))) while ((input_entry = readdir(input_dir)))
{ {
char device_path[256]; char device_path[256];
if (strncmp(input_entry->d_name, "event", 5) != 0) if (strncmp(input_entry->d_name, "event", 5) != 0)
continue; continue;
@ -276,6 +277,8 @@ _ecore_evas_fb_init(int w, int h)
caps = ecore_fb_input_device_cap_get(device); caps = ecore_fb_input_device_cap_get(device);
if (ecore_evas_input_devices)
{
/* Mouse */ /* Mouse */
if (caps & ECORE_FB_INPUT_DEVICE_CAP_RELATIVE) if (caps & ECORE_FB_INPUT_DEVICE_CAP_RELATIVE)
{ {
@ -304,6 +307,7 @@ _ecore_evas_fb_init(int w, int h)
} }
} }
} }
}
return _ecore_evas_init_count; return _ecore_evas_init_count;
} }
@ -479,6 +483,7 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
} }
ee->prop.fullscreen = on; ee->prop.fullscreen = on;
/* rescale the input device area */ /* rescale the input device area */
if (ecore_evas_input_devices)
{ {
Ecore_Fb_Input_Device *dev; Ecore_Fb_Input_Device *dev;
@ -487,7 +492,7 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
do do
{ {
ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h); ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h);
}while((dev = ecore_list_next(ecore_evas_input_devices))); } while ((dev = ecore_list_next(ecore_evas_input_devices)));
} }
if (resized) if (resized)
{ {