blitter: Adjust the right margin
The right margin only needs to be rounded to the nearest byte. Using the scanline is wrong for the hardware screens, where the value is artificially inflated (416 for 400 actual pixels) because DMCP uses the extra two bytes for its own internal processing. Swapping coordinates with 416 instead of 400 ends up messing up that data. Fixes: #1053 Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -1673,7 +1673,7 @@ inline void blitter::surface<blitter::MONOCHROME_REVERSE>::horizontal_adjust(
|
|||
// On the DM42, we need horizontal adjustment for coordinates
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
size w = scanline - 1;
|
||||
size w = (width() + 7)/8*8 - 1;
|
||||
coord ox1 = w - x2;
|
||||
x2 = w - x1;
|
||||
x1 = ox1;
|
||||
|
@ -1698,7 +1698,7 @@ inline void blitter::surface<blitter::RGB_16BPP>::horizontal_adjust(
|
|||
// On the DM42, we need horizontal adjustment for coordinates
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
size w = scanline - 1;
|
||||
size w = (width() + 7)/8*8 - 1;
|
||||
coord ox1 = w - x2;
|
||||
x2 = w - x1;
|
||||
x1 = ox1;
|
||||
|
|