{
uint32_t * data = (uint32_t *) fbbuff;
- uint32_t * d = (uint32_t *)lbb + xo + stride * ssy/*yoffs*/;
+ uint32_t * d = (uint32_t *)lbb + xo + swidth * ssy/*yoffs*/;
uint32_t * d2;
for (count = 0; count < yc; count++ ) {
d2++;
pixpos++;
}
- d += stride;
+ d += swidth;
}
}
break;
{
int F,R=rad,ssx=startx+_sx,ssy=starty+_sy,dxx=_ex-_sx,dyy=_ey-_sy,rx,ry,wx,wy,count;
- uint32_t *pos = lbb + ssx + stride * ssy;
+ uint32_t *pos = lbb + ssx + swidth * ssy;
uint32_t *pos0, *pos1, *pos2, *pos3, *i;
uint32_t pix = bgra[col];
rx=R-ssx;
ry=R-ssy;
- pos0=pos+(dyy-ry)*stride;
- pos1=pos+ry*stride;
- pos2=pos+rx*stride;
- pos3=pos+(dyy-rx)*stride;
+ pos0=pos+(dyy-ry)*swidth;
+ pos1=pos+ry*swidth;
+ pos2=pos+rx*swidth;
+ pos3=pos+(dyy-rx)*swidth;
while (ssx <= ssy)
{
rx=R-ssx;
*i = pix;
ssx++;
- pos2-=stride;
- pos3+=stride;
+ pos2-=swidth;
+ pos3+=swidth;
if (F<0)
{
F+=(ssx<<1)-1;
{
F+=((ssx-ssy)<<1);
ssy--;
- pos0-=stride;
- pos1+=stride;
+ pos0-=swidth;
+ pos1+=swidth;
}
}
- pos+=R*stride;
+ pos+=R*swidth;
}
for (count=R; count<(dyy-R); count++)
{
for(i=pos; i<pos+dxx;i++)
*i = pix;
- pos+=stride;
+ pos+=swidth;
}
}
#include "pngw.h"
-#define SH_VERSION 2.11
+#define SH_VERSION 2.12
static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf";
char INST_FILE[]="/tmp/rc.locked";
int instance=0;
int rclocked=0;
-int stride;
+int swidth;
int get_instance(void)
{
desc.flags = FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT;
//init backbuffer
+ int stride = fix_screeninfo.line_length;
+ swidth = stride/sizeof(uint32_t);
+ if(stride == 7680 && var_screeninfo.xres == 1280) {
+ var_screeninfo.yres = 1080;
+ }
if(!(lbb = malloc(var_screeninfo.xres*var_screeninfo.yres*sizeof(uint32_t))))
{
printf("%s <allocating of Backbuffer failed>\n", __plugin__);
munmap(lfb, fix_screeninfo.smem_len);
return -1;
}
- stride = fix_screeninfo.line_length/sizeof(uint32_t);
//lbb=lfb;
memset(lbb, TRANSP, var_screeninfo.xres*var_screeninfo.yres*sizeof(uint32_t));
#define TRANSP 0
extern uint32_t bgra[];
-extern int stride;
+extern int swidth;
extern uint32_t *lfb, *lbb;
extern int FSIZE_BIG;
if (_sx + sbit->xadvance >= _ex)
return -1; /* limit to maxwidth */
- uint32_t bgcolor = *(lbb + (starty + _sy - _d - 1) * stride + (startx + _sx + sbit->left));
+ uint32_t bgcolor = *(lbb + (starty + _sy - _d - 1) * swidth + (startx + _sx + sbit->left));
uint32_t fgcolor = bgra[color];
uint32_t *colors = lookup_colors(fgcolor, bgcolor);
- uint32_t *p = lbb + (startx + _sx + sbit->left + kerning.x) + stride * (starty + _sy - sbit->top - _d);
+ uint32_t *p = lbb + (startx + _sx + sbit->left + kerning.x) + swidth * (starty + _sy - sbit->top - _d);
uint32_t *r = p + (_ex - _sx); /* end of usable box */
for(row = 0; row < sbit->height; row++)
{
if (q > r) /* we are past _ex */
break;
}
- p += stride;
- r += stride;
+ p += swidth;
+ r += swidth;
}
}