Re: [AD] crash! unhandled exception wip414 win2k msvc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>  And unfortunately it still crashes in _colorconv_blit_16_to_32 (not sure
> whether it's in the same place but it's still in that function) when I
> alt+tab.

I've attached another tentative fix.

-- 
Eric Botcazou
--- /cvs/allegro/src/win/wddwin.c	Wed Oct  2 16:17:32 2002
+++ allegro/src/win/wddwin.c	Mon Nov  4 20:20:18 2002
@@ -272,11 +272,13 @@
    dest_desc.dwSize = sizeof(dest_desc);
    dest_desc.dwFlags = 0;
 
-   hr = IDirectDrawSurface2_Lock(dest_surf, dest_rect, &dest_desc, DDLOCK_WAIT, NULL);
+   hr = IDirectDrawSurface2_Lock(dest_surf, dest_rect, &dest_desc,
+                                 DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR, NULL);
    if (FAILED(hr))
       return -1;
 
-   hr = IDirectDrawSurface2_Lock(src_surf, src_rect, &src_desc, DDLOCK_WAIT, NULL);
+   hr = IDirectDrawSurface2_Lock(src_surf, src_rect, &src_desc,
+                                 DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR, NULL);
    if (FAILED(hr)) {
       IDirectDrawSurface2_Unlock(dest_surf, NULL);
       return -1;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/