c1_sub_dy = 1 - dy;
for (int x = changed_rect.tl.x; x < changed_rect.br.x; x++) {
- ptr = &scaled_data[(x + y*scaled_width) * 4];
+ ptr = &(*scaled_data)[(x + y*scaled_width) * 4];
i = (int)(dx = x / scale_ratio);
dx -= i;
ScaledDIBSectionBuffer::ScaledDIBSectionBuffer(HWND window)
: src_buffer(0), scaling(false), DIBSectionBuffer(window) {
- scaled_data = data;
+ scaled_data = &data;
}
ScaledDIBSectionBuffer::~ScaledDIBSectionBuffer() {
}
}
DIBSectionBuffer::setPF(pf_);
- scaled_data = data;
}
void ScaledDIBSectionBuffer::setSize(int src_width_, int src_height_) {
void ScaledDIBSectionBuffer::recreateScaledBuffer() {
if (width_ && height_ && (format.depth != 0)) {
DIBSectionBuffer::recreateBuffer();
- scaled_data = data;
}
}