pixel_width *pixel_height * sizeof(scrntype_t),
GL_MAP_WRITE_BIT ));
int hh = (pixel_height < p->height()) ? pixel_height : p->height();
+ int ww = (pixel_width < p->width()) ? pixel_width : p->width();
if(pp != NULL) {
for(int y = 0; y < hh; y++) {
- memcpy(&(pp[y * pixel_width]), p->scanLine(y), p->width() * sizeof(uint32_t));
+ memcpy(&(pp[y * pixel_width]), p->scanLine(y), ww * sizeof(uint32_t));
}
}
extfunc->glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
iw = (float)using_flags->get_real_screen_width();
ih = (float)using_flags->get_real_screen_height();
}
- //printf("%dx%d -> %fx%f\n", w, h, iw, ih);
+ printf("%dx%d -> %fx%f\n", w, h, iw, ih);
if(p_wid != NULL) {
screen_texture_width = w;
screen_texture_height = h;