Changeset 27989


Ignore:
Timestamp:
03/28/14 01:24:08 (10 years ago)
Author:
obi
Message:

add mediakey support we can set media button

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/keyactions.h

    r27740 r27989  
    55//key 1: red
    66//key 2: plugin
     7//key 3: media
    78//flag 0: without menulist
    89//flag 1: with menulist
     
    8485                if(key == 1) keyconf = getconfig("redkey", NULL);
    8586                if(key == 2) keyconf = getconfig("pluginkey", NULL);
     87                if(key == 3) keyconf = getconfig("mediakey", NULL);
    8688        }
    8789       
     
    9092                if(key == 1) screenkeyactions(1, 1);
    9193                if(key == 2) screenkeyactions(2, 1);
     94                if(key == 3) screenkeyactions(3, 1);
    9295                freemenulist(mlist, 1); mlist = NULL;
    9396                return;
     
    167170                return;
    168171        }
    169 
     172        else if(ostrcmp(keyconf, "RecordPlayer") == 0)
     173        {
     174                screenplay(NULL, NULL, 1, 0);
     175                freemenulist(mlist, 1); mlist = NULL;
     176                resettvpic();
     177                return;
     178        }
     179        else if(ostrcmp(keyconf, "MiniPlayer") == 0)
     180        {
     181                screenplay(NULL, NULL, 0, 0);
     182                freemenulist(mlist, 1); mlist = NULL;
     183                resettvpic();
     184                return;
     185        }
     186        else if(ostrcmp(keyconf, "MediaCenter") == 0)
     187        {
     188                struct skin* pluginnode = getplugin("Media Center");
     189                void (*startplugin)(void);
     190                status.infobaraktiv = 0;
     191                subtitlepause(1);
     192                status.infobar = 0;
     193
     194                if(pluginnode != NULL)
     195                {
     196                        startplugin = dlsym(pluginnode->pluginhandle, "start");
     197                        if(startplugin != NULL)
     198                        startplugin();
     199                }
     200                status.infobaraktiv = 1;
     201                drawscreen(skin, 0, 0);
     202                subtitlepause(0);
     203
     204                freemenulist(mlist, 1); mlist = NULL;
     205                resettvpic();
     206                return;
     207        }
     208               
    170209        pluginnode = getplugin(keyconf);
    171210
  • titan/titan/titan.c

    r27957 r27989  
    240240#include "settings_pluginbutton.h"
    241241#include "bcm.h"
     242#include "settings_mediabutton.h"
    242243
    243244#define TIMECODE ""
Note: See TracChangeset for help on using the changeset viewer.