source: trunk/platform/ixus200_sd980/sub/101c/lib.c @ 1527

Revision 1527, 1.5 KB checked in by philmoz, 17 months ago (diff)

Merge latest code from reyalp-flt branch to main trunk.

  • Property svn:eol-style set to native
Line 
1#include "platform.h"
2
3char *hook_raw_image_addr()
4{
5        return (char*)0x421E1120;
6}
7
8long hook_raw_size()
9{
10        return 0x11CA240;
11}
12
13
14void *vid_get_viewport_live_fb()//found in sub_FF8E0788
15{
16    void **fb=(void **)0x5014;
17    unsigned char buff = *((unsigned char*)0x4E5C);
18    if (buff == 0) buff = 2;  else buff--;
19//    return fb[buff];
20        if ((mode_get()&MODE_MASK) == MODE_REC)
21                return (void*)(fb[buff]-vid_get_viewport_xoffset()*3);
22        return (void*)fb[buff];
23}
24
25void *vid_get_bitmap_fb()
26{
27        return (void*)0x40431000;
28}
29
30void *vid_get_viewport_fb()
31{
32//      return (void*)0x408CB700;
33        if ((mode_get()&MODE_MASK) == MODE_REC)
34                return (void*)(0x408CB700-vid_get_viewport_xoffset()*3);
35        return (void*)0x408CB700;
36}
37
38void *vid_get_viewport_fb_d()
39{
40        return (void*)(*(int*)(0x28F0+0x58));
41}
42
43long vid_get_viewport_height()       { return 240; }
44
45// Physical width of viewport row in bytes
46int vid_get_viewport_byte_width() {
47        return 960 * 6 / 4;     // IXUS 200 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
48}
49
50int vid_get_viewport_width()
51{
52    if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)    // widescreen (16:9) image size
53                return 480;
54    else
55        return 360;
56}
57
58int vid_get_viewport_xoffset()
59{
60        if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)        // widescreen (16:9) image size
61           return 0;
62        else
63       return 60;
64}
65
66
67char *camera_jpeg_count_str()
68{
69        return (char*)0x4C138;
70}
71
72
73//only for cameras with a touchscreen
74short get_touch_click_x()
75{
76        return *(short*)(0x258C+6);
77}
78
79short get_touch_click_y()
80{
81        return *(short*)(0x258C+8);
82}
Note: See TracBrowser for help on using the repository browser.