Changeset 37100


Ignore:
Timestamp:
02/11/16 18:43:27 (7 years ago)
Author:
gost
Message:

[titan] activate animated menus for all mipsel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/mipselport.h

    r37086 r37100  
    198198        }
    199199       
     200        int posx = getconfigint("fbleftoffset", NULL) * 5;
     201        int posy = getconfigint("fbtopoffset", NULL) * 5;
     202        int width = 0;
     203        int height = 0;
     204       
    200205        if(status.bcm == 1 && status.usedirectfb == 0)
    201206        {
    202                 int posx = getconfigint("fbleftoffset", NULL) * 5;
    203                 int posy = getconfigint("fbtopoffset", NULL) * 5;
    204                 int width = (fb->width - posx) - (getconfigint("fbrightoffset", NULL) * 5);
    205                 int height = (fb->height - posy) - (getconfigint("fbbottomoffset", NULL) * 5);
     207                width = (fb->width - posx) - (getconfigint("fbrightoffset", NULL) * 5);
     208                height = (fb->height - posy) - (getconfigint("fbbottomoffset", NULL) * 5);
     209        }
     210        else
     211        {
     212                width = (720 - posx) - (getconfigint("fbrightoffset", NULL));
     213                height = (576 - posy) - (getconfigint("fbbottomoffset", NULL));
     214        }
     215       
     216        //printf("posx:%i posy:%i width:%i height:%i\n", posx, posy, width, height);
     217
     218        int i = 0, max = 1, wstep = 0, hstep = 0;
     219        int dst_left = 0, dst_width = 0, dst_top = 0, dst_height = 0;
     220        int mode3d = 0;
     221
     222        if(flag == 0)
     223        {
     224                if(status.bcm == 1 && status.usedirectfb == 0)
     225                        bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
     226                else
     227                        blit();
     228        }
     229       
     230        if(flag == 1 && status.screenanim > 0 && mode3d == 0)
     231        {
     232                doblit = 0;
     233                max = 25;
     234                dst_left = posx;
     235                dst_width = width;
     236                dst_top = posy;
     237                dst_height = height;
    206238               
    207                 int i = 0, max = 1, wstep = 0, hstep = 0;
    208                 int dst_left = 0, dst_width = 0, dst_top = 0, dst_height = 0;
    209                 int mode3d = 0;
    210                
    211                 if(flag == 1 && status.screenanim > 0 && mode3d == 0)
    212                 {
    213                         doblit = 0;
    214                         max = 25;
    215                         dst_left = posx;
    216                         dst_width = width;
    217                         dst_top = posy;
    218                         dst_height = height;
     239                char* fbleftdev = "/proc/stb/fb/dst_left";
     240                char* fbwidthdev = "/proc/stb/fb/dst_width";
     241                char* fbtopdev = "/proc/stb/fb/dst_top";
     242                char* fbheightdev = "/proc/stb/fb/dst_height";
    219243                       
     244                if(status.screenanim == 1 || status.screenanim == 3)
     245                {
     246                        dst_left = (width / 2) - 1;
     247                        dst_width = 2;
     248                }
     249                if(status.screenanim == 2 || status.screenanim == 3)
     250                {
     251                        dst_top = (height / 2) - 1;
     252                        dst_height = 2;
     253                }
     254                wstep = width / max;
     255                hstep = height / max;
     256                       
     257                for(i = 0; i <= max; i++)
     258                {
    220259                        if(status.screenanim == 1 || status.screenanim == 3)
    221260                        {
    222                                 dst_left = (width / 2) - 1;
    223                                 dst_width = 2;
     261                                int tmpleft = dst_left - (wstep/2);
     262                                int tmpwidth = dst_width + wstep;
     263                                if(tmpleft < posx)
     264                                        tmpleft = posx;
     265                                if(tmpwidth > width)
     266                                        tmpwidth = width;
     267                                dst_left = tmpleft;
     268                                dst_width = tmpwidth;
    224269                        }
    225270                        if(status.screenanim == 2 || status.screenanim == 3)
    226271                        {
    227                                 dst_top = (height / 2) - 1;
    228                                 dst_height = 2;
     272                                int tmptop = dst_top - (hstep/2);
     273                                int tmpheight = dst_height + hstep;
     274                                if(tmptop < posy)
     275                                        tmptop = posy;
     276                                if(tmpheight > height)
     277                                        tmpheight = height;
     278                                dst_top = tmptop;
     279                                dst_height = tmpheight;
    229280                        }
    230                         wstep = width / max;
    231                         hstep = height / max;
    232281                       
    233                         for(i = 0; i <= max; i++)
     282                        if((dst_width + dst_left) > width)
     283                                dst_left = dst_left - 1;
     284                       
     285                        if((dst_height + dst_top) > height)
     286                                dst_height = dst_height - 1;
     287                               
     288                        if(status.screenanim > 0) usleep(status.screenanimspeed * 1000);
     289                       
     290                        //printf("left:%i width:%i top:%i height:%i\n", dst_left, dst_width, dst_top, dst_height);
     291                        if(status.bcm == 1 && status.usedirectfb == 0)
     292                                bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, dst_left, dst_top, dst_width, dst_height, 0, 0);
     293                        else
    234294                        {
    235                                 if(status.screenanim == 1 || status.screenanim == 3)
    236                                 {
    237                                         int tmpleft = dst_left - (wstep/2);
    238                                         int tmpwidth = dst_width + wstep;
    239                                         if(tmpleft < posx)
    240                                                 tmpleft = posx;
    241                                         if(tmpwidth > width)
    242                                                 tmpwidth = width;
    243                                         dst_left = tmpleft;
    244                                         dst_width = tmpwidth;
    245                                 }
    246                                 if(status.screenanim == 2 || status.screenanim == 3)
    247                                 {
    248                                         int tmptop = dst_top - (hstep/2);
    249                                         int tmpheight = dst_height + hstep;
    250                                         if(tmptop < posy)
    251                                                 tmptop = posy;
    252                                         if(tmpheight > height)
    253                                                 tmpheight = height;
    254                                         dst_top = tmptop;
    255                                         dst_height = tmpheight;
    256                                 }
    257                                
    258                                 if(status.screenanim > 0) usleep(status.screenanimspeed * 1000);
    259                                 bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, dst_left, dst_top, dst_width, dst_height, 0, 0);
    260                                 blit();
     295                                setfbosddev(fbleftdev, dst_left);
     296                                setfbosddev(fbwidthdev, dst_width);
     297                                setfbosddev(fbtopdev, dst_top);
     298                                setfbosddev(fbheightdev, dst_height);
    261299                        }
    262                 }
    263                 else
    264                         bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
    265         }
     300                        blit();
     301                }
     302        }
     303        else
     304                bcm_accel_blit(skinfb->data_phys, skinfb->width, skinfb->height, skinfb->pitch, 0, fb->data_phys, fb->width, fb->height, fb->pitch, 0, 0, skinfb->width, skinfb->height, posx, posy, width, height, 0, 0);
    266305       
    267306        if(doblit == 1)
Note: See TracChangeset for help on using the changeset viewer.