VirtualBox

Changeset 38045 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 19, 2011 7:11:45 AM (13 years ago)
Author:
vboxsync
Message:

VBoxDisp: fixed PATBLTBRUSH for VRDE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVRDP.cpp

    r37423 r38045  
    752752    if (pptlBrush)
    753753    {
    754         int xDiff;
    755         int yDiff;
    756 
    757754        LOG(("Dst %d,%d Brush origin %d,%d", prclTrg->left, prclTrg->top, pptlBrush->x, pptlBrush->y));
    758755
    759         xDiff = prclTrg->left - pptlBrush->x;
    760         if (xDiff < 0)
    761         {
    762             xDiff = -xDiff;
    763         }
    764 
    765         yDiff = prclTrg->top - pptlBrush->y;
    766         if (yDiff < 0)
    767         {
    768             yDiff = -yDiff;
    769         }
    770 
    771         xSrc = (int8_t)(xDiff % 8);
    772         ySrc = (int8_t)(yDiff % 8);
     756        /* Make sure that the coords fit in a 8 bit value.
     757         * Only 8x8 pixel brushes are supported, so last 3 bits
     758         * is a [0..7] coordinate of the brush, because the brush
     759         * repeats after each 8 pixels.
     760         */
     761        xSrc = (int8_t)(pptlBrush->x & 7);
     762        ySrc = (int8_t)(pptlBrush->y & 7);
    773763    }
    774764
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette