forked from enlightenment/efl
Fix engine wrt the latest changes in evas. Add error messages
SVN revision: 34757
This commit is contained in:
parent
6a1b1c5ef9
commit
4e78b97de8
|
@ -133,7 +133,7 @@ _tmp_out_alloc(Render_Engine *re)
|
|||
Soft16_Image *im;
|
||||
|
||||
im = (Soft16_Image *) evas_cache_image_empty(evas_common_soft16_image_cache_get());
|
||||
im->flags.have_alpha = 0;
|
||||
im->cache_entry.flags.alpha = 0;
|
||||
evas_cache_image_surface_alloc(&im->cache_entry, w, h);
|
||||
|
||||
|
||||
|
|
|
@ -33,19 +33,31 @@ evas_software_wince_ddraw_init (HWND window)
|
|||
|
||||
priv->module = LoadLibrary(L"ddraw.dll");
|
||||
if (!priv->module)
|
||||
goto free_priv;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not load ddraw.dll\n");
|
||||
goto free_priv;
|
||||
}
|
||||
|
||||
lib_DirectDrawCreate = (fct_DirectDrawCreate)GetProcAddress(priv->module, L"DirectDrawCreate");
|
||||
if (!lib_DirectDrawCreate)
|
||||
goto free_lib;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not initialize DirectDraw\n");
|
||||
goto free_lib;
|
||||
}
|
||||
|
||||
res = lib_DirectDrawCreate(NULL, (IUnknown**)&priv->object, NULL);
|
||||
if (FAILED(res))
|
||||
goto free_lib;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not create DirectDraw object\n");
|
||||
goto free_lib;
|
||||
}
|
||||
|
||||
res = priv->object->SetCooperativeLevel(window, DDSCL_FULLSCREEN);
|
||||
if (FAILED(res))
|
||||
goto release_object;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not set window to fullscreen\n");
|
||||
goto release_object;
|
||||
}
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
|
@ -54,13 +66,19 @@ evas_software_wince_ddraw_init (HWND window)
|
|||
|
||||
res = priv->object->CreateSurface(&surface_desc, &priv->surface, NULL);
|
||||
if (FAILED(res))
|
||||
goto release_object;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not create surface\n");
|
||||
goto release_object;
|
||||
}
|
||||
|
||||
memset(&surface_desc, 0, sizeof(surface_desc));
|
||||
surface_desc.dwSize = sizeof(surface_desc);
|
||||
res = priv->surface->Lock(0, &surface_desc, DDLOCK_WAITNOTBUSY, 0);
|
||||
if (FAILED(res))
|
||||
goto release_surface;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not lock surface\n");
|
||||
goto release_surface;
|
||||
}
|
||||
|
||||
priv->width = surface_desc.dwWidth;
|
||||
priv->height = surface_desc.dwHeight;
|
||||
|
@ -68,7 +86,10 @@ evas_software_wince_ddraw_init (HWND window)
|
|||
|
||||
res = priv->surface->Unlock(NULL);
|
||||
if (FAILED(res))
|
||||
goto release_surface;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE DDraw] Can not unlock surface\n");
|
||||
goto release_surface;
|
||||
}
|
||||
|
||||
return priv;
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ evas_software_wince_fb_init (HWND window)
|
|||
dc = GetDC (window);
|
||||
if (!dc)
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE FB] Can not get DC\n");
|
||||
free(priv);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -75,6 +76,7 @@ evas_software_wince_fb_init (HWND window)
|
|||
(char *) &gxInfo);
|
||||
if (result <= 0)
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE FB] [Ipaq] ExtEscape() failed\n");
|
||||
ReleaseDC(window, dc);
|
||||
free(priv);
|
||||
return NULL;
|
||||
|
@ -93,6 +95,7 @@ evas_software_wince_fb_init (HWND window)
|
|||
(rfbi.wBPP != 16) ||
|
||||
(rfbi.wFormat != 1))
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE FB] ExtEscape() failed\n");
|
||||
ReleaseDC(window, dc);
|
||||
free(priv);
|
||||
return NULL;
|
||||
|
|
|
@ -106,10 +106,11 @@ evas_software_wince_gapi_init (HWND window)
|
|||
if (!gapi_lib)
|
||||
{
|
||||
gapi_lib = LoadLibrary(L"gx.dll");
|
||||
if (!gapi_lib) {
|
||||
printf ("error : LoadLibrary\n");
|
||||
goto free_priv;
|
||||
}
|
||||
if (!gapi_lib)
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not load gx.dll\n");
|
||||
goto free_priv;
|
||||
}
|
||||
}
|
||||
|
||||
LINK(display_open, display_open, L"?GXOpenDisplay@@YAHPAUHWND__@@K@Z");
|
||||
|
@ -128,13 +129,13 @@ evas_software_wince_gapi_init (HWND window)
|
|||
!suspend ||
|
||||
!resume)
|
||||
{
|
||||
printf ("error : no valid symbols\n");
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not find valid symbols\n");
|
||||
goto free_lib;
|
||||
}
|
||||
|
||||
if (!display_open(window, GX_FULLSCREEN))
|
||||
{
|
||||
printf ("error : GXOpenDisplay\n");
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not open display\n");
|
||||
goto free_lib;
|
||||
}
|
||||
|
||||
|
@ -143,7 +144,7 @@ evas_software_wince_gapi_init (HWND window)
|
|||
// verify pixel format
|
||||
if(!(prop.ffFormat & kfDirect565) || (prop.cBPP != 16))
|
||||
{
|
||||
printf ("error : GAPI format mismatch\n");
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] display format mismatch\n");
|
||||
goto close_display;
|
||||
}
|
||||
|
||||
|
@ -151,7 +152,7 @@ evas_software_wince_gapi_init (HWND window)
|
|||
if ((GetSystemMetrics(SM_CXSCREEN) != (int)prop.cxWidth) ||
|
||||
(GetSystemMetrics(SM_CYSCREEN) != (int)prop.cyHeight))
|
||||
{
|
||||
printf ("error : GAPI size mismatch\n");
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] display size mismatch\n");
|
||||
goto close_display;
|
||||
}
|
||||
|
||||
|
@ -217,13 +218,17 @@ v | |
|
|||
|
||||
dc = GetDC (window);
|
||||
if (!dc)
|
||||
goto close_display;
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] Can not get device\n");
|
||||
goto close_display;
|
||||
}
|
||||
|
||||
gxInfo.Version = 100;
|
||||
result = ExtEscape(dc, GETGXINFO, 0, NULL, sizeof(gxInfo),
|
||||
(char *) &gxInfo);
|
||||
if (result <= 0)
|
||||
{
|
||||
fprintf (stderr, "[Evas] [Engine] [WinCE GAPI] ExtEscape failed\n");
|
||||
ReleaseDC(window, dc);
|
||||
goto close_display;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue