LoadImage: respect the desired size when loading a bitmap

Alexandre Julliard julliard at winehq.org
Fri Jun 10 13:24:31 CDT 2005


Huw D M Davies <h.davies1 at physics.ox.ac.uk> writes:

> +    orig_bm = SelectObject(screen_mem_dc, hbitmap);
> +    StretchDIBits(screen_mem_dc, 0, 0, new_width, new_height, 0, 0, width, height, bits, fix_info, DIB_RGB_COLORS, SRCCOPY);
> +    SelectObject(screen_mem_dc, orig_bm);

That's not thread safe, you either need a critical section around the
global screen_mem_dc, or probably better simply create a mem DC local
to the function.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list