Ignore:
Timestamp:
11/09/12 18:36:29 (11 years ago)
Author:
gost
Message:

[ipCam] activate 2. Cam

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/instar/instar.h

    r16512 r18514  
    55char* cam2 = NULL;
    66struct skin* instar_screen = NULL;
     7struct skin* instar_pic1 = NULL;
     8struct skin* instar_actcam1 = NULL;
    79int actcam = 1;
    810
     
    141143                                free(tmpstr); tmpstr = NULL;   
    142144                                free(positionstop); positionstop = NULL;
     145                        }
     146                        if(rcret == getrcconfigint("rcred", NULL)) {
     147                                if(actcam == 1 && cam2 != NULL) {
     148                                        actcam = 2;
     149                                        changepic(instar_pic1, "/tmp/instar2.jpg");
     150                                        changetext(instar_actcam1, "CAM2");
     151                                        tempcam = cam2;
     152                                        addlist(myconfig, "InstarActCam", "2");
     153                                }
     154                                else if(actcam == 2 && cam1 != NULL) {
     155                                        actcam = 1;
     156                                        changepic(instar_pic1, "/tmp/instar1.jpg");
     157                                        changetext(instar_actcam1, "CAM1");
     158                                        tempcam = cam1;
     159                                        addlist(myconfig, "InstarActCam", "1");
     160                                }
    143161                        }
    144162                }
     
    267285                       
    268286               
    269                         /*
     287                       
    270288                        if(ostrcmp(getlist(myconfig, "InstarCam2", NULL), "ein") == 0)
    271289                        {
     
    278296                                cam2 = ostrcat(cam2, getlist(myconfig, "InstarCam2Port", NULL), 1, 0);
    279297                        }
    280                         */
    281        
     298                       
     299                               
    282300                        instar_screen = getscreen("instar_full");
    283        
    284                         actcam = 1;
    285        
     301                        instar_pic1 = getscreennode(instar_screen, "pic1");
     302                        instar_actcam1 = getscreennode(instar_screen, "actcam1");
     303       
     304                        if(ostrcmp(getlist(myconfig, "InstarActCam", NULL), "2") == 0)
     305                        {
     306                                actcam = 2;
     307                                changepic(instar_pic1, "/tmp/instar2.jpg");
     308                                changetext(instar_actcam1, "CAM2");
     309                        }
     310                        else
     311                        {
     312                                actcam = 1;
     313                                changepic(instar_pic1, "/tmp/instar1.jpg");
     314                                changetext(instar_actcam1, "CAM1");
     315                        }
     316                       
    286317                        rcode = show_control();
    287318       
Note: See TracChangeset for help on using the changeset viewer.