[Spice-devel] [PATCH 22/24] mingw32 build: various fixes
Hans de Goede
hdegoede at redhat.com
Wed Dec 8 00:47:14 PST 2010
Hi,
On 12/07/2010 10:28 PM, Alon Levy wrote:
> ---
> client/windows/red_window.cpp | 2 +-
> common/gdi_canvas.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/client/windows/red_window.cpp b/client/windows/red_window.cpp
> index 56a757b..9f79ab3 100644
> --- a/client/windows/red_window.cpp
> +++ b/client/windows/red_window.cpp
> @@ -366,7 +366,7 @@ void RedWindow_p::destroy(PixelsSource_p& pixels_source)
>
> ReleaseDC(_win, pixels_source.dc);
> SetWindowLongPtr(_win, GWLP_WNDPROC, (LONG_PTR)DefWindowProc);
> - SetWindowLongPtr(_win, GWLP_USERDATA, NULL);
> + SetWindowLongPtr(_win, GWLP_USERDATA, (LONG_PTR)NULL);
> DestroyWindow(_win);
> }
>
> diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
> index 705a040..d57aafc 100644
> --- a/common/gdi_canvas.c
> +++ b/common/gdi_canvas.c
> @@ -471,7 +471,7 @@ static void copy_bitmap_alpha(const uint8_t *src_alpha, int height, int width, i
>
> alphaval = src_alpha[i];
> alphaval = alphaval>> (i_count * i_offset);
> - alphaval = alphaval&= ((uint8_t)0xff>> (8 - i_offset));
> + alphaval&= ((uint8_t)0xff>> (8 - i_offset));
I would prefer to see this here, to be consistent with the other lines:
alphaval = alphaval & ((uint8_t)0xff>> (8 - i_offset));
> alphaval = ((255 * alphaval) / ((uint8_t)0xff>> (8 - i_offset)));
>
> dest_bitmap[x * 4 + 3] = alphaval;
> @@ -637,7 +637,7 @@ static HBRUSH get_brush(GdiCanvas *canvas, SpiceBrush *brush, RecurciveMutex **b
> case SPICE_BRUSH_TYPE_PATTERN: {
> GdiCanvas *gdi_surface = NULL;
> HBRUSH hbrush;
> - pixman_image_t *surface;
> + pixman_image_t *surface = NULL;
> HDC dc;
> HBITMAP bitmap;
> HBITMAP prev_bitmap;
Regards,
Hans
More information about the Spice-devel
mailing list