curr_frame_=0;
if( !init() ){
- if(cb) cb->error(_("Target initialisation failure"));
+ if(cb) cb->error(_("Target initialization failure"));
return false;
}
Surface surface;
int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w();
+ if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit?
int rows = desc.get_h()/rowheight;
int lastrowheight = desc.get_h() - rows*rowheight;
RendDesc blockrd = desc;
//render the strip at the normal size unless it's the last one...
- if(i == rows)
+ if(i == rows-1)
{
if(!lastrowheight) break;
blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);
Surface surface;
int totalheight = desc.get_h();
int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w();
+ if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit?
int rows = desc.get_h()/rowheight;
int lastrowheight = desc.get_h() - rows*rowheight;
RendDesc blockrd = desc;
//render the strip at the normal size unless it's the last one...
- if(i == rows)
+ if(i == rows-1)
{
if(!lastrowheight) break;
blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);