Changeset 1894
- Timestamp:
- 06/02/12 23:54:46 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reyalp-ptp-live/platform/a540/sub/100b/lib.c
r1870 r1894 54 54 55 55 int vid_get_viewport_width_proper() { 56 int m = mode_get(); 57 if((m&MODE_MASK) == MODE_PLAY) { 58 return 704; 59 } 56 60 // fake 1:1 mode 57 if((m ode_get()&MODE_SHOOTING_MASK) == MODE_PORTRAIT) {61 if((m&MODE_SHOOTING_MASK) == MODE_PORTRAIT) { 58 62 return 528; 59 63 } 60 return ((mode_get()&MODE_MASK) == MODE_PLAY)?704:*(int*)0x32C68;64 return *(int*)0x32C68; 61 65 } 62 66 int vid_get_viewport_width() { … … 65 69 66 70 int vid_get_viewport_height_proper() { 71 int m = mode_get(); 72 // TODO not correct if TV out connected 73 if((m&MODE_MASK) == MODE_PLAY) { 74 return 240; 75 } 67 76 // fake 16:9 mode 68 if((m ode_get()&MODE_SHOOTING_MASK) == MODE_LANDSCAPE) {77 if((m&MODE_SHOOTING_MASK) == MODE_LANDSCAPE) { 69 78 return 180; 70 79 } 71 return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:*(int*)(0x32C68+4);80 return *(int*)(0x32C68+4); 72 81 } 73 82 … … 162 171 163 172 int vid_get_viewport_display_xoffset() { 164 int val=0; 165 int m = mode_get(); 166 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) { 173 int m = mode_get(); 174 if((m&MODE_MASK) == MODE_PLAY) { 175 return 0; 176 } else if((m&MODE_SHOOTING_MASK) == MODE_STITCH) { 167 177 short dir=0; 168 178 short seq=0; … … 172 182 // live part is 1/2, so margin is either 1/8th or 3/8th 173 183 if(dir==0) { 174 val =seq?132:44;184 return seq?132:44; 175 185 } else { 176 val =seq?44:132;186 return seq?44:132; 177 187 } 178 188 } else if((m&MODE_SHOOTING_MASK) == MODE_PORTRAIT) { 179 val =44;180 } 181 return val;189 return 44; 190 } 191 return 0; 182 192 } 183 193 184 194 int vid_get_viewport_xoffset() { 185 if((mode_get()&MODE_SHOOTING_MASK) == MODE_PORTRAIT) { 195 int m = mode_get(); 196 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_PORTRAIT) { 186 197 return 44; 187 198 } … … 191 202 int vid_get_viewport_display_yoffset() { 192 203 int m = mode_get(); 204 if((m&MODE_MASK) == MODE_PLAY) { 205 return 0; 206 } 193 207 if((m&MODE_SHOOTING_MASK) == MODE_LANDSCAPE) { 194 208 return 30; 195 209 } 196 return ((m&MODE_ MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH)?60:0; // window is 120, centered in 240 screen210 return ((m&MODE_SHOOTING_MASK) == MODE_STITCH)?60:0; // window is 120, centered in 240 screen 197 211 } 198 212 199 213 int vid_get_viewport_yoffset() { 200 if((mode_get()&MODE_SHOOTING_MASK) == MODE_LANDSCAPE) { 214 int m = mode_get(); 215 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_LANDSCAPE) { 201 216 return 30; 202 217 }
Note: See TracChangeset
for help on using the changeset viewer.