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

Revision 1828, 1.3 KB checked in by philmoz, 13 months ago (diff)

Update to viewport functions and code using them to handle the G1X viewport system.
This is now more flexible by allowing viewport buffer offsets to be seperate from the viewport display offsets, it can handle stitch mode properly. This is also needed for reyalp's new live view system.

  • 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 (void*)fb[buff];
20}
21
22void *vid_get_bitmap_fb()
23{
24        return (void*)0x40431000;
25}
26
27void *vid_get_viewport_fb()
28{
29        return (void*)0x408CB700;
30}
31
32void *vid_get_viewport_fb_d()
33{
34        return (void*)(*(int*)(0x28F0+0x58));
35}
36
37long vid_get_viewport_height()       { return 240; }
38
39// Physical width of viewport row in bytes
40int vid_get_viewport_byte_width() {
41        return 960 * 6 / 4;     // IXUS 200 - wide screen LCD is 960 pixels wide, each group of 4 pixels uses 6 bytes (UYVYYY)
42}
43
44int vid_get_viewport_width()
45{
46    if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)    // widescreen (16:9) image size
47                return 480;
48    else
49        return 360;
50}
51
52int vid_get_viewport_display_xoffset()
53{
54        if (shooting_get_prop(PROPCASE_RESOLUTION) == 8)        // widescreen (16:9) image size
55           return 0;
56        else
57       return 60;
58}
59
60
61char *camera_jpeg_count_str()
62{
63        return (char*)0x4C138;
64}
65
66
67//only for cameras with a touchscreen
68short get_touch_click_x()
69{
70        return *(short*)(0x258C+6);
71}
72
73short get_touch_click_y()
74{
75        return *(short*)(0x258C+8);
76}
Note: See TracBrowser for help on using the repository browser.