Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2005 Peter D'Hoye |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | #include "plugin.h" |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 22 | #include "helper.h" |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 23 | #include "grey.h" |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 24 | |
| 25 | #ifdef HAVE_LCD_BITMAP |
| 26 | |
Jens Arnold | 1509faf | 2008-03-02 16:57:14 +0000 | [diff] [blame] | 27 | PLUGIN_IRAM_DECLARE |
| 28 | |
Jens Arnold | b701322 | 2007-07-27 09:57:27 +0000 | [diff] [blame] | 29 | #if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \ |
| 30 | (CONFIG_KEYPAD == IPOD_1G2G_PAD) |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 31 | #define FPS_QUIT BUTTON_MENU |
Jens Arnold | 29361ab | 2008-03-22 10:24:28 +0000 | [diff] [blame] | 32 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD |
| 33 | #define FPS_QUIT BUTTON_RC_REC |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 34 | #elif defined(BUTTON_OFF) |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 35 | #define FPS_QUIT BUTTON_OFF |
Daniel Stenberg | 8521215 | 2006-04-11 08:03:45 +0000 | [diff] [blame] | 36 | #else |
| 37 | #define FPS_QUIT BUTTON_POWER |
| 38 | #endif |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 39 | |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 40 | #define DURATION (2*HZ) /* longer duration gives more precise results */ |
| 41 | |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 42 | PLUGIN_HEADER |
| 43 | |
Steve Bavin | 6526577 | 2008-05-13 09:57:56 +0000 | [diff] [blame] | 44 | static const struct plugin_api* rb; |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 45 | |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 46 | /* Screen logging */ |
| 47 | static int line; |
| 48 | static int max_line; |
| 49 | #ifdef HAVE_REMOTE_LCD |
| 50 | static int remote_line; |
| 51 | static int remote_max_line; |
| 52 | #endif |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 53 | #if LCD_DEPTH < 4 |
| 54 | static unsigned char *gbuf; |
| 55 | static size_t gbuf_size; |
| 56 | #endif |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 57 | |
| 58 | static void log_init(void) |
| 59 | { |
| 60 | int h; |
| 61 | |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 62 | rb->lcd_getstringsize("A", NULL, &h); |
| 63 | max_line = LCD_HEIGHT / h; |
| 64 | line = 0; |
| 65 | rb->lcd_clear_display(); |
| 66 | rb->lcd_update(); |
| 67 | #ifdef HAVE_REMOTE_LCD |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 68 | rb->lcd_remote_getstringsize("A", NULL, &h); |
| 69 | remote_max_line = LCD_REMOTE_HEIGHT / h; |
| 70 | remote_line = 0; |
| 71 | rb->lcd_remote_clear_display(); |
| 72 | rb->lcd_remote_update(); |
| 73 | #endif |
| 74 | } |
| 75 | |
| 76 | static void log_text(char *text) |
| 77 | { |
| 78 | rb->lcd_puts(0, line, text); |
| 79 | if (++line >= max_line) |
| 80 | line = 0; |
| 81 | rb->lcd_update(); |
| 82 | #ifdef HAVE_REMOTE_LCD |
| 83 | rb->lcd_remote_puts(0, remote_line, text); |
| 84 | if (++remote_line >= remote_max_line) |
| 85 | remote_line = 0; |
| 86 | rb->lcd_remote_update(); |
| 87 | #endif |
| 88 | } |
| 89 | |
| 90 | static int calc_tenth_fps(int framecount, long ticks) |
| 91 | { |
| 92 | return (10*HZ) * framecount / ticks; |
| 93 | } |
| 94 | |
| 95 | static void time_main_update(void) |
| 96 | { |
| 97 | char str[32]; /* text buffer */ |
| 98 | long time_start; /* start tickcount */ |
| 99 | long time_end; /* end tickcount */ |
| 100 | int frame_count; |
| 101 | int fps; |
| 102 | |
| 103 | const int part14_x = LCD_WIDTH/4; /* x-offset for 1/4 update test */ |
| 104 | const int part14_w = LCD_WIDTH/2; /* x-size for 1/4 update test */ |
| 105 | const int part14_y = LCD_HEIGHT/4; /* y-offset for 1/4 update test */ |
| 106 | const int part14_h = LCD_HEIGHT/2; /* y-size for 1/4 update test */ |
| 107 | |
| 108 | /* Test 1: full LCD update */ |
| 109 | frame_count = 0; |
| 110 | rb->sleep(0); /* sync to tick */ |
| 111 | time_start = *rb->current_tick; |
| 112 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 113 | { |
| 114 | rb->lcd_update(); |
| 115 | frame_count++; |
| 116 | } |
| 117 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 118 | rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10); |
| 119 | log_text(str); |
| 120 | |
| 121 | /* Test 2: quarter LCD update */ |
| 122 | frame_count = 0; |
| 123 | rb->sleep(0); /* sync to tick */ |
| 124 | time_start = *rb->current_tick; |
| 125 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 126 | { |
| 127 | rb->lcd_update_rect(part14_x, part14_y, part14_w, part14_h); |
| 128 | frame_count++; |
| 129 | } |
| 130 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 131 | rb->snprintf(str, sizeof(str), "1/4: %d.%d fps", fps / 10, fps % 10); |
| 132 | log_text(str); |
| 133 | } |
| 134 | |
| 135 | #ifdef HAVE_LCD_COLOR |
| 136 | |
| 137 | #if LCD_WIDTH >= LCD_HEIGHT |
| 138 | #define YUV_WIDTH LCD_WIDTH |
| 139 | #define YUV_HEIGHT LCD_HEIGHT |
| 140 | #else /* Assume the screen is rotated on portrait LCDs */ |
| 141 | #define YUV_WIDTH LCD_HEIGHT |
| 142 | #define YUV_HEIGHT LCD_WIDTH |
| 143 | #endif |
| 144 | |
| 145 | static unsigned char ydata[YUV_HEIGHT][YUV_WIDTH]; |
| 146 | static unsigned char udata[YUV_HEIGHT/2][YUV_WIDTH/2]; |
| 147 | static unsigned char vdata[YUV_HEIGHT/2][YUV_WIDTH/2]; |
| 148 | |
| 149 | static unsigned char * const yuvbuf[3] = { |
| 150 | (void*)ydata, |
| 151 | (void*)udata, |
| 152 | (void*)vdata |
| 153 | }; |
| 154 | |
Jens Arnold | 0d3ca00 | 2007-10-15 23:07:25 +0000 | [diff] [blame] | 155 | static void make_gradient_rect(int width, int height) |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 156 | { |
| 157 | unsigned char vline[YUV_WIDTH/2]; |
| 158 | int x, y; |
| 159 | |
| 160 | width /= 2; |
| 161 | height /= 2; |
| 162 | |
| 163 | for (x = 0; x < width; x++) |
| 164 | vline[x] = (x << 8) / width; |
| 165 | for (y = 0; y < height; y++) |
| 166 | { |
| 167 | rb->memset(udata[y], (y << 8) / height, width); |
| 168 | rb->memcpy(vdata[y], vline, width); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | static void time_main_yuv(void) |
| 173 | { |
| 174 | char str[32]; /* text buffer */ |
| 175 | long time_start; /* start tickcount */ |
| 176 | long time_end; /* end tickcount */ |
| 177 | int frame_count; |
| 178 | int fps; |
| 179 | |
| 180 | const int part14_x = YUV_WIDTH/4; /* x-offset for 1/4 update test */ |
| 181 | const int part14_w = YUV_WIDTH/2; /* x-size for 1/4 update test */ |
| 182 | const int part14_y = YUV_HEIGHT/4; /* y-offset for 1/4 update test */ |
| 183 | const int part14_h = YUV_HEIGHT/2; /* y-size for 1/4 update test */ |
| 184 | |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 185 | rb->memset(ydata, 128, sizeof(ydata)); /* medium grey */ |
| 186 | |
| 187 | /* Test 1: full LCD update */ |
| 188 | make_gradient_rect(YUV_WIDTH, YUV_HEIGHT); |
| 189 | |
| 190 | frame_count = 0; |
| 191 | rb->sleep(0); /* sync to tick */ |
| 192 | time_start = *rb->current_tick; |
| 193 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 194 | { |
Jens Arnold | 68a2168 | 2008-03-24 00:35:53 +0000 | [diff] [blame] | 195 | rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 196 | 0, 0, YUV_WIDTH, YUV_HEIGHT); |
| 197 | frame_count++; |
| 198 | } |
| 199 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 200 | rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10); |
| 201 | log_text(str); |
| 202 | |
| 203 | /* Test 2: quarter LCD update */ |
| 204 | make_gradient_rect(YUV_WIDTH/2, YUV_HEIGHT/2); |
| 205 | |
| 206 | frame_count = 0; |
| 207 | rb->sleep(0); /* sync to tick */ |
| 208 | time_start = *rb->current_tick; |
| 209 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 210 | { |
Jens Arnold | 68a2168 | 2008-03-24 00:35:53 +0000 | [diff] [blame] | 211 | rb->lcd_blit_yuv(yuvbuf, 0, 0, YUV_WIDTH, |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 212 | part14_x, part14_y, part14_w, part14_h); |
| 213 | frame_count++; |
| 214 | } |
| 215 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 216 | rb->snprintf(str, sizeof(str), "1/4: %d.%d fps", fps / 10, fps % 10); |
| 217 | log_text(str); |
| 218 | } |
| 219 | #endif |
| 220 | |
| 221 | #ifdef HAVE_REMOTE_LCD |
| 222 | static void time_remote_update(void) |
| 223 | { |
| 224 | char str[32]; /* text buffer */ |
| 225 | long time_start; /* start tickcount */ |
| 226 | long time_end; /* end tickcount */ |
| 227 | int frame_count; |
| 228 | int fps; |
| 229 | |
| 230 | const int part14_x = LCD_REMOTE_WIDTH/4; /* x-offset for 1/4 update test */ |
| 231 | const int part14_w = LCD_REMOTE_WIDTH/2; /* x-size for 1/4 update test */ |
| 232 | const int part14_y = LCD_REMOTE_HEIGHT/4; /* y-offset for 1/4 update test */ |
| 233 | const int part14_h = LCD_REMOTE_HEIGHT/2; /* y-size for 1/4 update test */ |
| 234 | |
| 235 | /* Test 1: full LCD update */ |
| 236 | frame_count = 0; |
| 237 | rb->sleep(0); /* sync to tick */ |
| 238 | time_start = *rb->current_tick; |
| 239 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 240 | { |
| 241 | rb->lcd_remote_update(); |
| 242 | frame_count++; |
| 243 | } |
| 244 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 245 | rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10); |
| 246 | log_text(str); |
| 247 | |
| 248 | /* Test 2: quarter LCD update */ |
| 249 | frame_count = 0; |
| 250 | rb->sleep(0); /* sync to tick */ |
| 251 | time_start = *rb->current_tick; |
| 252 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 253 | { |
| 254 | rb->lcd_remote_update_rect(part14_x, part14_y, part14_w, part14_h); |
| 255 | frame_count++; |
| 256 | } |
| 257 | fps = calc_tenth_fps(frame_count, time_end - time_start); |
| 258 | rb->snprintf(str, sizeof(str), "1/4: %d.%d fps", fps / 10, fps % 10); |
| 259 | log_text(str); |
| 260 | } |
| 261 | #endif |
| 262 | |
Jens Arnold | 40919d7 | 2008-03-25 23:21:36 +0000 | [diff] [blame] | 263 | #if LCD_DEPTH < 4 |
Jens Arnold | a72499a | 2008-01-13 00:11:43 +0000 | [diff] [blame] | 264 | |
Jens Arnold | 1509faf | 2008-03-02 16:57:14 +0000 | [diff] [blame] | 265 | GREY_INFO_STRUCT_IRAM |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; |
| 267 | |
| 268 | static void make_grey_rect(int width, int height) |
| 269 | { |
| 270 | unsigned char vline[LCD_WIDTH]; |
| 271 | int x, y; |
| 272 | |
| 273 | for (x = 0; x < width; x++) |
| 274 | vline[x] = (x << 8) / width; |
| 275 | for (y = 0; y < height; y++) |
| 276 | rb->memcpy(greydata[y], vline, width); |
| 277 | } |
| 278 | |
| 279 | static void time_greyscale(void) |
| 280 | { |
| 281 | char str[32]; /* text buffer */ |
| 282 | long time_start; /* start tickcount */ |
| 283 | long time_end; /* end tickcount */ |
| 284 | long time_1, time_2; |
| 285 | int frames_1, frames_2; |
| 286 | int fps, load; |
| 287 | |
| 288 | gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size); |
Jens Arnold | df8749d | 2008-04-06 13:59:31 +0000 | [diff] [blame] | 289 | if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP, |
| 290 | LCD_WIDTH, LCD_HEIGHT, NULL)) |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 291 | { |
| 292 | log_text("greylib: out of memory."); |
| 293 | return; |
| 294 | } |
| 295 | make_grey_rect(LCD_WIDTH, LCD_HEIGHT); |
| 296 | |
| 297 | /* Test 1 - greyscale overlay not yet enabled */ |
| 298 | frames_1 = 0; |
| 299 | rb->sleep(0); /* sync to tick */ |
| 300 | time_start = *rb->current_tick; |
| 301 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 302 | { |
| 303 | grey_ub_gray_bitmap(greydata[0], 0, 0, LCD_WIDTH, LCD_HEIGHT); |
| 304 | frames_1++; |
| 305 | } |
| 306 | time_1 = time_end - time_start; |
| 307 | |
| 308 | /* Test 2 - greyscale overlay enabled */ |
| 309 | grey_show(true); |
| 310 | frames_2 = 0; |
| 311 | rb->sleep(0); /* sync to tick */ |
| 312 | time_start = *rb->current_tick; |
| 313 | while((time_end = *rb->current_tick) - time_start < DURATION) |
| 314 | { |
| 315 | grey_ub_gray_bitmap(greydata[0], 0, 0, LCD_WIDTH, LCD_HEIGHT); |
| 316 | frames_2++; |
| 317 | } |
| 318 | time_2 = time_end - time_start; |
| 319 | |
| 320 | grey_release(); |
| 321 | fps = calc_tenth_fps(frames_2, time_2); |
Jens Arnold | a72499a | 2008-01-13 00:11:43 +0000 | [diff] [blame] | 322 | load = 100 - (100 * frames_2 * time_1) / (frames_1 * time_2); |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 323 | rb->snprintf(str, sizeof(str), "1/1: %d.%d fps", fps / 10, fps % 10); |
| 324 | log_text(str); |
| 325 | |
| 326 | if (load > 0 && load < 100) |
| 327 | { |
| 328 | rb->snprintf(str, sizeof(str), "CPU load: %d%%", load); |
| 329 | log_text(str); |
| 330 | } |
| 331 | else |
| 332 | log_text("CPU load err (boost?)"); |
| 333 | } |
| 334 | #endif |
| 335 | |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 336 | /* plugin entry point */ |
Steve Bavin | 6526577 | 2008-05-13 09:57:56 +0000 | [diff] [blame] | 337 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 338 | { |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 339 | #ifndef SIMULATOR |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 340 | char str[32]; |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 341 | int cpu_freq; |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 342 | #endif |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 343 | |
| 344 | /* standard stuff */ |
Jens Arnold | 1509faf | 2008-03-02 16:57:14 +0000 | [diff] [blame] | 345 | PLUGIN_IRAM_INIT(api) |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 346 | (void)parameter; |
| 347 | rb = api; |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 348 | |
| 349 | log_init(); |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 350 | #ifndef SIMULATOR |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 351 | cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */ |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 352 | #endif |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 353 | backlight_force_on(rb); /* backlight control in lib/helper.c */ |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 354 | |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 355 | log_text("Main LCD Update"); |
| 356 | time_main_update(); |
| 357 | #ifdef HAVE_LCD_COLOR |
| 358 | log_text("Main LCD YUV"); |
| 359 | time_main_yuv(); |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 360 | #endif |
Jens Arnold | 40919d7 | 2008-03-25 23:21:36 +0000 | [diff] [blame] | 361 | #if LCD_DEPTH < 4 |
Jens Arnold | 54aeada | 2008-01-08 00:06:54 +0000 | [diff] [blame] | 362 | log_text("Greyscale library"); |
| 363 | time_greyscale(); |
| 364 | #endif |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 365 | #ifdef HAVE_REMOTE_LCD |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 366 | log_text("Remote LCD Update"); |
| 367 | time_remote_update(); |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 368 | #endif |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 369 | |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 370 | #ifndef SIMULATOR |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 371 | if (*rb->cpu_frequency != cpu_freq) |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 372 | rb->snprintf(str, sizeof(str), "CPU clock changed!"); |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 373 | else |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 374 | rb->snprintf(str, sizeof(str), "CPU: %d MHz", |
| 375 | (cpu_freq + 500000) / 1000000); |
| 376 | log_text(str); |
Jens Arnold | 5fee03c | 2007-08-05 20:41:49 +0000 | [diff] [blame] | 377 | #endif |
Jens Arnold | cb4186c | 2007-10-13 22:32:35 +0000 | [diff] [blame] | 378 | backlight_use_settings(rb); /* backlight control in lib/helper.c */ |
Jens Arnold | 93c1626 | 2006-04-11 19:29:01 +0000 | [diff] [blame] | 379 | |
Jens Arnold | 151748e | 2006-04-08 10:27:34 +0000 | [diff] [blame] | 380 | /* wait until user closes plugin */ |
| 381 | while (rb->button_get(true) != FPS_QUIT); |
| 382 | |
| 383 | return PLUGIN_OK; |
| 384 | } |
| 385 | #endif |