Commit c82249621cc0cbf59405003cea3610941c897cb1

Authored by Alain Prouté
1 parent 94503ee3

fixed a bug (int was replaced by U32 instead of int32 when migrating to 64 bits)…

… in syscalls 'paint_host_image' and 'paint_host_image_to_buffer'
Showing 1 changed file with 40 additions and 40 deletions   Show diff stats
anubis_dev/vm/src/syscall.cpp
... ... @@ -7325,32 +7325,32 @@ Returns: (One)unique.
7325 7325 /* Expects:
7326 7326 at *(MAM(m_SP)-1): HostWindow hw
7327 7327 at *(MAM(m_SP)-2): ClippingRectangle clip
7328   - at *(MAM(m_SP)-3): Int32 x
7329   - at *(MAM(m_SP)-4): Int32 y
  7328 + at *(MAM(m_SP)-3): Word32 x
  7329 + at *(MAM(m_SP)-4): Word32 y
7330 7330 at *(MAM(m_SP)-5): HostImage image
7331 7331  
7332 7332 Returns: (One)unique
7333 7333  
7334 7334 paints the image at position (x,y) in the window (after clipping).
7335 7335  
7336   -x a window
7337   -+-------------------------------------------------+
7338   -| |
7339   -| image |
7340   -y| ...................... |
7341   -| . . |
7342   -| . rect . |
7343   -b| . +---------+ . |
7344   -| . | | . |
7345   -| . | | . |
7346   -| . | | . |
7347   -| . +---------+ . |v
7348   -| . . |
7349   -| ...................... |
7350   -| |
7351   -| |
7352   -+-------------------------------------------------+
7353   -u
  7336 + x a window
  7337 + +-------------------------------------------------+
  7338 + | |
  7339 + | image |
  7340 + y| ...................... |
  7341 + | . . |
  7342 + | . rect . |
  7343 + b| . +---------+ . |
  7344 + | . | | . |
  7345 + | . | | . |
  7346 + | . | | . |
  7347 + | . +---------+ . |v
  7348 + | . . |
  7349 + | ...................... |
  7350 + | |
  7351 + | |
  7352 + +-------------------------------------------------+
  7353 + u
7354 7354  
7355 7355 The upper left corner of the pixmap should come at (x,y) in the window regardless of
7356 7356 clipping. If the clipping rectangle is (a,b,u,v) (relative to the window), the
... ... @@ -7376,16 +7376,16 @@ dest_y = sup(y,b)
7376 7376 {
7377 7377 U32 the_window = (((U32 *)(((U32 *)(*(MAM(m_SP)-1)))[1]))[1]);
7378 7378 U32 the_pixmap = (((U32 *)(((U32 *)(*(MAM(m_SP)-5)))[1]))[1]);
7379   - U32 a = (((U32 *)(*(MAM(m_SP)-2)))[1]);
7380   - U32 b = (((U32 *)(*(MAM(m_SP)-2)))[2]);
7381   - U32 u = (((U32 *)(*(MAM(m_SP)-2)))[3]);
7382   - U32 v = (((U32 *)(*(MAM(m_SP)-2)))[4]);
7383   - U32 x = (*(MAM(m_SP)-3));
7384   - U32 y = (*(MAM(m_SP)-4));
7385   - U32 w, h;
7386   - U32 src_w, src_h;
7387   -
7388   - host_pixmap_size((HostImage)the_pixmap, &w, &h);
  7379 + int32 a = (((U32 *)(*(MAM(m_SP)-2)))[1]);
  7380 + int32 b = (((U32 *)(*(MAM(m_SP)-2)))[2]);
  7381 + int32 u = (((U32 *)(*(MAM(m_SP)-2)))[3]);
  7382 + int32 v = (((U32 *)(*(MAM(m_SP)-2)))[4]);
  7383 + int32 x = (*(MAM(m_SP)-3));
  7384 + int32 y = (*(MAM(m_SP)-4));
  7385 + int32 w, h;
  7386 + int32 src_w, src_h;
  7387 +
  7388 + host_pixmap_size((HostImage)the_pixmap, (U32*)&w, (U32*)&h);
7389 7389 src_w = inf(u,x+w)-sup(x,a);
7390 7390 src_h = inf(v,y+h)-sup(y,b);
7391 7391  
... ... @@ -7410,16 +7410,16 @@ dest_y = sup(y,b)
7410 7410 {
7411 7411 U32 destination = (((U32 *)(((U32 *)(*(MAM(m_SP)-1)))[1]))[1]);
7412 7412 U32 the_pixmap = (U32)(((U32 *)(((U32 *)(*(MAM(m_SP)-5)))[1]))[1]);
7413   - U32 a = (((U32 *)(*(MAM(m_SP)-2)))[1]);
7414   - U32 b = (((U32 *)(*(MAM(m_SP)-2)))[2]);
7415   - U32 u = (((U32 *)(*(MAM(m_SP)-2)))[3]);
7416   - U32 v = (((U32 *)(*(MAM(m_SP)-2)))[4]);
7417   - U32 x = (*(MAM(m_SP)-3));
7418   - U32 y = (*(MAM(m_SP)-4));
7419   - U32 w, h;
7420   - U32 src_w, src_h;
7421   -
7422   - host_pixmap_size((HostImage)the_pixmap, &w, &h);
  7413 + int32 a = (((U32 *)(*(MAM(m_SP)-2)))[1]);
  7414 + int32 b = (((U32 *)(*(MAM(m_SP)-2)))[2]);
  7415 + int32 u = (((U32 *)(*(MAM(m_SP)-2)))[3]);
  7416 + int32 v = (((U32 *)(*(MAM(m_SP)-2)))[4]);
  7417 + int32 x = (*(MAM(m_SP)-3));
  7418 + int32 y = (*(MAM(m_SP)-4));
  7419 + int32 w, h;
  7420 + int32 src_w, src_h;
  7421 +
  7422 + host_pixmap_size((HostImage)the_pixmap, (U32*)&w, (U32*)&h);
7423 7423 src_w = inf(u,x+w)-sup(x,a);
7424 7424 src_h = inf(v,y+h)-sup(y,b);
7425 7425  
... ...