Changeset 28008


Ignore:
Timestamp:
03/28/14 03:51:11 (10 years ago)
Author:
obi
Message:

optimize

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/keyactions.h

    r28005 r28008  
    7171                                if(child->del == PLUGINDELMARK && (status.security == 1 || (status.security == 0 && checkpluginskip(child->name) == 0)))
    7272                                {
    73                                         if(!ostrncmp("Media Center", child->name, 12))
    74                                         {
    75                                                 addmenulist(&mlist, "MediaCenter", NULL, child->pic, 0, 0);                     
    76                                         }
    77                                         else if(!ostrncmp("TiTan Mediathek", child->name, 15))
    78                                         {
    79                                                 addmenulist(&mlist, "MediaThek", NULL, child->pic, 0, 0);
    80                                         }
    81                                         else if(!ostrncmp("Titan Media Center", child->name, 18))
    82                                         {
    83                                                 addmenulist(&mlist, "TitanMediaCenter", NULL, child->pic, 0, 0);
     73                                        if(ostrcmp(child->name, "Media Center") == 0)
     74                                        {
     75                                                addmenulist(&mlist, child->name, NULL, child->pic, 0, 0);                       
     76                                        }
     77                                        else if(ostrcmp(child->name, "TiTan Mediathek") == 0)
     78                                        {
     79                                                addmenulist(&mlist, child->name, NULL, child->pic, 0, 0);
     80                                        }
     81                                        else if(ostrcmp(child->name, "Titan Media Center") == 0)
     82                                        {
     83                                                addmenulist(&mlist, child->name, NULL, child->pic, 0, 0);
    8484                                        }
    8585                                }
     
    211211                return;
    212212        }
    213         else if(ostrcmp(keyconf, "MediaCenter") == 0)
    214         {
    215                 struct skin* pluginnode = getplugin("Media Center");
    216                 void (*startplugin)(void);
    217                 status.infobaraktiv = 0;
    218                 subtitlepause(1);
    219                 status.infobar = 0;
    220 
    221                 if(pluginnode != NULL)
    222                 {
    223                         startplugin = dlsym(pluginnode->pluginhandle, "start");
    224                         if(startplugin != NULL)
    225                         startplugin();
    226                 }
    227                 status.infobaraktiv = 1;
    228                 drawscreen(skin, 0, 0);
    229                 subtitlepause(0);
    230 
    231                 freemenulist(mlist, 1); mlist = NULL;
    232                 resettvpic();
    233                 return;
    234         }
    235         else if(ostrcmp(keyconf, "Mediathek") == 0)
    236         {
    237                 struct skin* pluginnode = getplugin("TiTan Mediathek");
    238                 void (*startplugin)(void);
    239                 status.infobaraktiv = 0;
    240                 subtitlepause(1);
    241                 status.infobar = 0;
    242 
    243                 if(pluginnode != NULL)
    244                 {
    245                         startplugin = dlsym(pluginnode->pluginhandle, "start");
    246                         if(startplugin != NULL)
    247                         startplugin();
    248                 }
    249                 status.infobaraktiv = 1;
    250                 drawscreen(skin, 0, 0);
    251                 subtitlepause(0);
    252 
    253                 freemenulist(mlist, 1); mlist = NULL;
    254                 resettvpic();
    255                 return;
    256         }
    257         else if(ostrcmp(keyconf, "TitanMediaCenter") == 0)
    258         {
    259                 struct skin* pluginnode = getplugin("Titan Media Center");
    260                 void (*startplugin)(void);
    261                 status.infobaraktiv = 0;
    262                 subtitlepause(1);
    263                 status.infobar = 0;
    264 
    265                 if(pluginnode != NULL)
    266                 {
    267                         startplugin = dlsym(pluginnode->pluginhandle, "start");
    268                         if(startplugin != NULL)
    269                         startplugin();
    270                 }
    271                 status.infobaraktiv = 1;
    272                 drawscreen(skin, 0, 0);
    273                 subtitlepause(0);
    274 
    275                 freemenulist(mlist, 1); mlist = NULL;
    276                 resettvpic();
    277                 return;
    278         }
    279213               
    280214        pluginnode = getplugin(keyconf);
  • titan/titan/settings_mediabutton.h

    r28005 r28008  
    2626                if(child->del == PLUGINDELMARK && (status.security == 1 || (status.security == 0 && checkpluginskip(child->name) == 0)))
    2727                {
    28                         if(!ostrncmp("Media Center", child->name, 12))
     28                        if(ostrcmp(child->name, "Media Center") == 0)
    2929                        {
    3030                                addmenulist(&mlist, "MediaCenter", NULL, child->pic, 0, 0);                     
    3131                        }
    32                         else if(!ostrncmp("TiTan Mediathek", child->name, 15))
     32                        else if(ostrcmp(child->name, "TiTan Mediathek") == 0)
    3333                        {
    3434                                addmenulist(&mlist, "MediaThek", NULL, child->pic, 0, 0);
    3535                        }
    36                         else if(!ostrncmp("Titan Media Center", child->name, 15))
     36                        else if(ostrcmp(child->name, "Titan Media Center") == 0)
    3737                        {
    3838                                addmenulist(&mlist, "TitanMediaCenter", NULL, child->pic, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.