Changeset 847 for trunk/platform/s2is/main.c
- Timestamp:
- 12/02/09 09:31:02 (4 years ago)
- File:
-
- 1 edited
-
trunk/platform/s2is/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/platform/s2is/main.c
r845 r847 203 203 } 204 204 205 static struct { 206 int hackmode; 207 int canonmode; 208 } modemap[] = { 209 { MODE_AUTO, 5 }, 210 { MODE_P, 1 }, 211 { MODE_TV, 3 }, 212 { MODE_AV, 2 }, 213 { MODE_M, 0 }, 214 { MODE_PORTRAIT, 6 }, 215 { MODE_NIGHT, 8 }, 216 { MODE_LANDSCAPE, 7 }, 217 { MODE_VIDEO_STD, 16 }, 218 { MODE_STITCH, 15 }, 219 { MODE_MY_COLORS, 4 }, 220 { MODE_SCN_NIGHT, 14 }, 221 { MODE_SCN_INDOOR, 13 }, 222 { MODE_SCN_FOLIAGE, 9 }, 223 { MODE_SCN_SNOW, 10 }, 224 { MODE_SCN_BEACH, 11 }, 225 { MODE_SCN_FIREWORK, 12 }, 226 }; 227 #define MODESCNT (sizeof(modemap)/sizeof(modemap[0])) 228 229 int mode_get() { 230 int mode, i, t=0xFF; 231 mode = (playrec_mode==1)?MODE_REC:MODE_PLAY; 232 mode |= (physw_copy[1] & 0x00000001)?0:MODE_SCREEN_OPENED; 233 mode |= (physw_copy[1] & 0x00000002)?0:MODE_SCREEN_ROTATED; 234 235 t=0xFF; 236 _GetPropertyCase(PROPCASE_SHOOTING_MODE, &t, 4); 237 for (i=0; i<MODESCNT; ++i) { 238 if (modemap[i].canonmode == t) { 239 return (mode | (modemap[i].hackmode & MODE_SHOOTING_MASK)); 240 } 241 } 242 return (mode); 243 } 205 206 int screen_opened(void) { 207 // mode |= (physw_copy[1] & 0x00000001)?0:MODE_SCREEN_OPENED; 208 return !(physw_copy[1] & 0x00000001); 209 } 210 211 int screen_rotated(void) { 212 // mode |= (physw_copy[1] & 0x00000002)?0:MODE_SCREEN_ROTATED; 213 return !(physw_copy[1] & 0x00000002); 214 } 215 216 int rec_mode_active(void) { 217 // mode = (playrec_mode==1)?MODE_REC:MODE_PLAY; 218 return (playrec_mode==1); 219 }
Note: See TracChangeset
for help on using the changeset viewer.