MAKELONG should be lo, hi, not hi, lo

ulab-original
jsorg71 19 years ago
parent 9df403d523
commit 9655dff462

@ -30,11 +30,16 @@
#define DEBUG(args)
#endif
/* other macros */
#undef MIN
#define MIN(x1, x2) ((x1) < (x2) ? (x1) : (x2))
#undef MAX
#define MAX(x1, x2) ((x1) > (x2) ? (x1) : (x2))
#undef HIWORD
#define HIWORD(in) (((in) & 0xffff0000) >> 16)
#undef LOWORD
#define LOWORD(in) ((in) & 0x0000ffff)
#define MAKELONG(hi, lo) ((((hi) & 0xffff) << 16) | ((lo) & 0xffff))
#undef MAKELONG
#define MAKELONG(lo, hi) ((((hi) & 0xffff) << 16) | ((lo) & 0xffff))
#define MAKERECT(r, x, y, cx, cy) \
{ (r).left = x; (r).top = y; (r).right = (x) + (cx); (r).bottom = (y) + (cy); }
#define ISRECTEMPTY(r) (((r).right <= (r).left) || ((r).bottom <= (r).top))

@ -975,7 +975,7 @@ xrdp_bitmap_invalidate(struct xrdp_bitmap* self, struct xrdp_rect* rect)
if (check_bounds(self->wm->screen, &x, &y, &w, &h))
{
self->wm->mod->mod_event(self->wm->mod, WM_INVALIDATE,
MAKELONG(x, y), MAKELONG(w, h), 0, 0);
MAKELONG(y, x), MAKELONG(h, w), 0, 0);
}
}
}

@ -174,7 +174,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
self->bitmap_items[i][j].stamp = self->bitmap_stamp;
DEBUG(("found bitmap at %d %d\n\r", i, j));
xrdp_bitmap_delete(bitmap);
return MAKELONG(i, j);
return MAKELONG(j, i);
}
}
}
@ -192,7 +192,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
self->bitmap_items[i][j].stamp = self->bitmap_stamp;
DEBUG(("found bitmap at %d %d\n\r", i, j));
xrdp_bitmap_delete(bitmap);
return MAKELONG(i, j);
return MAKELONG(j, i);
}
}
}
@ -260,7 +260,7 @@ xrdp_cache_add_bitmap(struct xrdp_cache* self, struct xrdp_bitmap* bitmap)
bitmap->height, bitmap->bpp,
bitmap->data, cache_id, cache_idx);
}
return MAKELONG(cache_id, cache_idx);
return MAKELONG(cache_idx, cache_id);
}
/*****************************************************************************/
@ -337,7 +337,7 @@ xrdp_cache_add_char(struct xrdp_cache* self,
{
self->char_items[i][j].stamp = self->char_stamp;
DEBUG(("found font at %d %d\n\r", i, j));
return MAKELONG(i, j);
return MAKELONG(j, i);
}
}
}
@ -370,7 +370,7 @@ xrdp_cache_add_char(struct xrdp_cache* self,
fi->height = font_item->height;
self->char_items[f][c].stamp = self->char_stamp;
libxrdp_orders_send_font(self->session, fi, f, c);
return MAKELONG(f, c);
return MAKELONG(c, f);
}
/*****************************************************************************/

Loading…
Cancel
Save