Subversion Repositories freemyipod

Rev

Rev 838 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 838 Rev 843
Line 37... Line 37...
37
    struct chooser_action_handler_wheel_data* adata;
37
    struct chooser_action_handler_wheel_data* adata;
38
    adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
38
    adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
39
    if (adata->timeout_remaining != TIMEOUT_BLOCK)
39
    if (adata->timeout_remaining != TIMEOUT_BLOCK)
40
    {
40
    {
41
        snprintf(buf, sizeof(buf), "%3d", adata->timeout_remaining / 1000000);
41
        snprintf(buf, sizeof(buf), "%3d", adata->timeout_remaining / 1000000);
42
        rendertext(framebuf, 155, 121, 176, 0xcf7f0000, 0, buf);
42
        rendertext(framebuf, 155, 121, 176, 0xffffcccc, 0, buf);
43
    }
43
    }
44
    update_display(data);
44
    update_display(data);
45
    return false;
45
    return false;
46
}
46
}
47
 
47
 
Line 51... Line 51...
51
                          LIBUI_POINT(44, 44)),
51
                          LIBUI_POINT(44, 44)),
52
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 0)),
52
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 0)),
53
                                   LIBUI_POINT(44, 44)),
53
                                   LIBUI_POINT(44, 44)),
54
    .text = "Power off",
54
    .text = "Power off",
55
    .text_color = 0xffffcccc,
55
    .text_color = 0xffffcccc,
56
    .text_bgcolor = 0x7f000000,
-
 
57
    .render = NULL
56
    .render = NULL
58
};
57
};
59
 
58
 
60
struct chooser_renderer_iconflow_itemdata mainchooser_rparams_crapple =
59
struct chooser_renderer_iconflow_itemdata mainchooser_rparams_crapple =
61
{
60
{
Line 63... Line 62...
63
                          LIBUI_POINT(44, 44)),
62
                          LIBUI_POINT(44, 44)),
64
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 44)),
63
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 44)),
65
                                   LIBUI_POINT(44, 44)),
64
                                   LIBUI_POINT(44, 44)),
66
    .text = "Original firmware",
65
    .text = "Original firmware",
67
    .text_color = 0xffffcccc,
66
    .text_color = 0xffffcccc,
68
    .text_bgcolor = 0x7f000000,
-
 
69
    .render = NULL
67
    .render = NULL
70
};
68
};
71
 
69
 
72
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
70
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
73
{
71
{
Line 75... Line 73...
75
                          LIBUI_POINT(44, 44)),
73
                          LIBUI_POINT(44, 44)),
76
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 88)),
74
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 88)),
77
                                   LIBUI_POINT(44, 44)),
75
                                   LIBUI_POINT(44, 44)),
78
    .text = "Rockbox",
76
    .text = "Rockbox",
79
    .text_color = 0xffffcccc,
77
    .text_color = 0xffffcccc,
80
    .text_bgcolor = 0x7f000000,
-
 
81
    .render = NULL
78
    .render = NULL
82
};
79
};
83
 
80
 
84
struct chooser_renderer_iconflow_itemdata mainchooser_rparams_diskmode =
81
struct chooser_renderer_iconflow_itemdata mainchooser_rparams_diskmode =
85
{
82
{
Line 87... Line 84...
87
                          LIBUI_POINT(44, 44)),
84
                          LIBUI_POINT(44, 44)),
88
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 132)),
85
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 132)),
89
                                   LIBUI_POINT(44, 44)),
86
                                   LIBUI_POINT(44, 44)),
90
    .text = "Disk mode",
87
    .text = "Disk mode",
91
    .text_color = 0xffffcccc,
88
    .text_color = 0xffffcccc,
92
    .text_bgcolor = 0x7f000000,
-
 
93
    .render = NULL
89
    .render = NULL
94
};
90
};
95
 
91
 
96
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
92
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
97
{
93
{
Line 99... Line 95...
99
                          LIBUI_POINT(44, 44)),
95
                          LIBUI_POINT(44, 44)),
100
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 176)),
96
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 176)),
101
                                   LIBUI_POINT(44, 44)),
97
                                   LIBUI_POINT(44, 44)),
102
    .text = "emCORE console",
98
    .text = "emCORE console",
103
    .text_color = 0xffffcccc,
99
    .text_color = 0xffffcccc,
104
    .text_bgcolor = 0x7f000000,
-
 
105
    .render = NULL
100
    .render = NULL
106
};
101
};
107
 
102
 
108
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
103
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
109
{
104
{
Line 111... Line 106...
111
                          LIBUI_POINT(44, 44)),
106
                          LIBUI_POINT(44, 44)),
112
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 220)),
107
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 44), LIBUI_POINT(0, 220)),
113
                                   LIBUI_POINT(44, 44)),
108
                                   LIBUI_POINT(44, 44)),
114
    .text = "Tools",
109
    .text = "Tools",
115
    .text_color = 0xffffcccc,
110
    .text_color = 0xffffcccc,
116
    .text_bgcolor = 0x7f000000,
-
 
117
    .render = NULL
111
    .render = NULL
118
};
112
};
119
 
113
 
120
static struct chooser_renderer_iconflow_params mainchooser_rparams =
114
static struct chooser_renderer_iconflow_params mainchooser_rparams =
121
{
115
{
Line 264... Line 258...
264
}
258
}
265
 
259
 
266
void mainchooser_apply_settings()
260
void mainchooser_apply_settings()
267
{
261
{
268
    mainchooser.defaultitem = settings.default_item;
262
    mainchooser.defaultitem = settings.default_item;
269
    if (settings.snow) mainchooser.tickinterval = 50000;
-
 
270
    else mainchooser.tickinterval = 990000;
-
 
271
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
263
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
272
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
264
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
273
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
265
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
274
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
266
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
275
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;
267
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;