|
@@ -185,11 +185,11 @@ int main( int argc, char** argv ) {
|
185
|
185
|
}
|
186
|
186
|
// We're 100% accurate, but the mouse can't select the very bottom row or very right column of pixels.
|
187
|
187
|
// We detect if either are 1 pixel off and attempt to correct it.
|
188
|
|
- if ( w == xengine->getWidth() - 1 ) {
|
189
|
|
- w = xengine->getWidth();
|
|
188
|
+ if ( cx + w == xengine->getWidth() - 1 ) {
|
|
189
|
+ w = xengine->getWidth() - cx;
|
190
|
190
|
}
|
191
|
|
- if ( h == xengine->getHeight() - 1 ) {
|
192
|
|
- h = xengine->getHeight();
|
|
191
|
+ if ( cy + h == xengine->getHeight() - 1 ) {
|
|
192
|
+ h = xengine->getHeight() - cy;
|
193
|
193
|
}
|
194
|
194
|
// Set the selection rectangle's dimensions to mouse movement.
|
195
|
195
|
// We use the function setDim since rectangles can't have negative widths,
|