row_bytes was used in a weird way, and still is, if you would take row_bytes literally
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15622 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
36e605d5f3
commit
f6cef39e1e
@ -352,12 +352,13 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update the new rowbyte
|
// update the new rowbyte
|
||||||
row_bytes = info->bytes_per_row/(info->bits_per_pixel/8);
|
// NOTE: "row_bytes" is completely misnamed, and was misused too
|
||||||
|
row_bytes = info->bytes_per_row / (info->bits_per_pixel / 8);
|
||||||
|
|
||||||
// update the screen bases (only one of the 3 will be really used).
|
// update the screen bases (only one of the 3 will be really used).
|
||||||
draw_ptr8 = ((uint8*)info->bits) + row_bytes*info->window_bounds.top + info->window_bounds.left;
|
draw_ptr8 = (uint8*)info->bits + info->bytes_per_row * info->window_bounds.top + (info->window_bounds.left * info->bits_per_pixel / 8);
|
||||||
draw_ptr16 = ((uint16*)info->bits) + row_bytes*info->window_bounds.top + info->window_bounds.left;
|
draw_ptr16 = (uint16*)draw_ptr8;
|
||||||
draw_ptr32 = ((uint32*)info->bits) + row_bytes*info->window_bounds.top + info->window_bounds.left;
|
draw_ptr32 = (uint32*)draw_ptr8;
|
||||||
|
|
||||||
// cancel the erasing of all stars if the buffer has been reset.
|
// cancel the erasing of all stars if the buffer has been reset.
|
||||||
// Because of a bug in the R3 direct window protocol, B_BUFFER_RESET is not set
|
// Because of a bug in the R3 direct window protocol, B_BUFFER_RESET is not set
|
||||||
|
Loading…
Reference in New Issue
Block a user