Enlightenment CVS committal Author : doursse Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_16_wince Modified Files: evas_wince_gapi_buffer.c Log Message: fix keys on Ipaq H38xx and H39xx =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_wince_gapi_buffer.c 9 May 2008 23:12:00 -0000 1.4 +++ evas_wince_gapi_buffer.c 22 May 2008 10:40:40 -0000 1.5 @@ -62,6 +62,7 @@ gapi_default_keys_get default_keys_get = NULL; gapi_suspend suspend = NULL; gapi_resume resume = NULL; +_GAPI_Key_List *default_keys = NULL; int evas_software_wince_gapi_suspend(void) @@ -84,17 +85,7 @@ void * evas_software_wince_gapi_default_keys(void) { - _GAPI_Key_List key_list; - _GAPI_Key_List *keys; - - keys = (_GAPI_Key_List *)malloc(sizeof(_GAPI_Key_List)); - if (!keys) - return NULL; - - key_list = default_keys_get(GX_NORMALKEYS); - memcpy(keys, &key_list, sizeof(_GAPI_Key_List)); - - return keys; + return default_keys; } @@ -202,7 +193,16 @@ priv->draw_begin = draw_begin; priv->draw_end = draw_end; - /* Ipaq H38** and H39** are completely buggy */ + key_list = default_keys_get(GX_NORMALKEYS); + default_keys = (_GAPI_Key_List *)malloc(sizeof(_GAPI_Key_List)); + if (!default_keys) + { + printf ("error : GXOpenInput\n"); + goto close_input; + } + memcpy(default_keys, &key_list, sizeof(_GAPI_Key_List)); + + /* GAPI on Ipaq H38** and H39** is completely buggy */ /* They are detected as portrait device (width = 240 and height = 320) */ /* but the framebuffer is managed like a landscape device : */ /* @@ -252,6 +252,10 @@ priv->width = prop.cyHeight; priv->height = prop.cxWidth; priv->stride = prop.cbxPitch; + default_keys->vkA = 193; + default_keys->vkB = 194; + default_keys->vkC = 195; + default_keys->vkStart = 196; } else { @@ -262,6 +266,8 @@ return priv; + close_input: + input_close(); close_display: display_close(); free_lib: ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs