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:
Ipaq H38** and H39** are considered as landscape device because of their
uglyness
===================================================================
RCS file:
/cvs/e/e17/libs/evas/src/modules/engines/software_16_wince/evas_wince_gapi_buffer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_wince_gapi_buffer.c 8 May 2008 06:46:26 -0000 1.3
+++ evas_wince_gapi_buffer.c 9 May 2008 23:12:00 -0000 1.4
@@ -107,11 +107,13 @@
gapi_draw_end draw_end;
int width;
int height;
+ int stride;
};
void *
evas_software_wince_gapi_init (HWND window)
{
+ WCHAR oemstr[100];
_GAPI_Display_Properties prop;
_GAPI_Key_List key_list;
HMODULE gapi_lib;
@@ -199,8 +201,64 @@
priv->close_input = input_close;
priv->draw_begin = draw_begin;
priv->draw_end = draw_end;
- priv->width = prop.cxWidth;
- priv->height = prop.cyHeight;
+
+ /* Ipaq H38** and H39** are completely buggy */
+ /* They are detected as portrait device (width = 240 and height = 320) */
+ /* but the framebuffer is managed like a landscape device : */
+ /*
+ 240
+ +---------+
+ | |
+ | |
+ | |
+ | |
+ | | 320
+ | ^^^ |
+ | ||| |
+ | ||| |
+ | ||| |
+ +---------+
+ ---->
+
+ */
+ /* So these devices are considered as landscape devices */
+ /* and width and height are switched. */
+ /* Other devices are managed normally : */
+ /*
+ 240
+ +---------+
+| |---> |
+| |---> |
+| |---> |
+v | |
+ | | 320
+ | |
+ | |
+ | |
+ | |
+ +---------+
+
+ */
+
+ SystemParametersInfo (SPI_GETOEMINFO, sizeof (oemstr), oemstr, 0);
+
+ if (((oemstr[12] == 'H') &&
+ (oemstr[13] == '3') &&
+ (oemstr[14] == '8')) ||
+ ((oemstr[12] == 'H') &&
+ (oemstr[13] == '3') &&
+ (oemstr[14] == '9')))
+ {
+ priv->width = prop.cyHeight;
+ priv->height = prop.cxWidth;
+ priv->stride = prop.cbxPitch;
+ }
+ else
+ {
+ priv->width = prop.cxWidth;
+ priv->height = prop.cyHeight;
+ priv->stride = prop.cbyPitch;
+ }
return priv;
@@ -250,7 +308,7 @@
fbob->im = (Soft16_Image *)
evas_cache_image_data(evas_common_soft16_image_cache_get(), width, height,
(DATA32 *)buffer, 0, EVAS_COLORSPACE_RGB565_A5P);
if (fbob->im)
- fbob->im->stride = width;
+ fbob->im->stride = ((Evas_Engine_WinCE_GAPI_Priv *)priv)->stride >> 1;
return fbob;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs