fix row_pitch

This commit is contained in:
loki
2020-04-29 22:01:43 +02:00
parent e10c9a1fa1
commit af1135d455
2 changed files with 3 additions and 12 deletions

View File

@@ -252,7 +252,7 @@ std::shared_ptr<platf::img_t> display_ram_t::alloc_img() {
auto img = std::make_shared<img_t>();
img->pixel_pitch = 4;
img->row_pitch = img->pixel_pitch * width;
img->row_pitch = img_info.RowPitch;
img->width = width;
img->height = height;
img->data = new std::uint8_t[img->row_pitch * height];
@@ -298,4 +298,4 @@ int display_ram_t::init() {
return 0;
}
}
}