source: titan/plugins/streaminfo/streaminfo.h @ 43326

Last change on this file since 43326 was 32775, checked in by Stephan, 9 years ago

fix for mipsel aspect

File size: 1.6 KB
RevLine 
[15561]1#ifndef STREAMINFO_H
2#define STREAMINFO_H
3
4void screenstreaminfo()
5{
6        int rcret = 0;
7        struct skin* streaminfo = getscreen("streaminfo");
8        struct skin* aspect = getscreennode(streaminfo, "aspect");
9        struct skin* framerate = getscreennode(streaminfo, "framerate");
10        struct skin* xres = getscreennode(streaminfo, "xres");
11        struct skin* yres = getscreennode(streaminfo, "yres");
12        char* tmpstr = NULL;
13        unsigned long tmpnr = 0;
14
15        while(1)
16        {
17                tmpstr = getdevcontent("vmpegaspectdev");
18                if(tmpstr != NULL)
19                {
[32775]20#ifdef MIPSEL
21            if(ostrncmp(tmpstr, "0", 1) == 1)
22#else
[15561]23                        if(ostrncmp(tmpstr, "0", 1) == 0)
[32775]24#endif
[15561]25                                changetext(aspect, "4:3");
26                        else
27                                changetext(aspect, "16:9");
28                }
29                free(tmpstr); tmpstr = NULL;
30
31                tmpstr = getdevcontent("vmpegframeratedev");
32                if(tmpstr != NULL)
33                {
34                        tmpnr = strtol(tmpstr, 0, 16);
35                        free(tmpstr); tmpstr = NULL;
36                        tmpstr = olutoa(tmpnr);
37                        changetext(framerate, tmpstr);
38                }
39                free(tmpstr); tmpstr = NULL;
40
41                tmpstr = getdevcontent("vmpegxresdev");
42                if(tmpstr != NULL)
43                {
44                        tmpnr = strtol(tmpstr, 0, 16);
45                        free(tmpstr); tmpstr = NULL;
46                        tmpstr = olutoa(tmpnr);
47                        changetext(xres, tmpstr);
48                }
49                free(tmpstr); tmpstr = NULL;
50
51                tmpstr = getdevcontent("vmpegyresdev");
52                if(tmpstr != NULL)
53                {
54                        tmpnr = strtol(tmpstr, 0, 16);
55                        free(tmpstr); tmpstr = NULL;
56                        tmpstr = olutoa(tmpnr);
57                        changetext(yres, tmpstr);
58                }
59                free(tmpstr); tmpstr = NULL;
60
[16512]61                drawscreen(streaminfo, 0, 0);
[15561]62
63                rcret = waitrc(streaminfo, 1000, 0);
[16512]64                if(rcret == getrcconfigint("rcexit", NULL)) break;
65                if(rcret == getrcconfigint("rcok", NULL)) break;
[15561]66        }
67
68        clearscreen(streaminfo);
69}
70
71#endif
Note: See TracBrowser for help on using the repository browser.