summaryrefslogtreecommitdiff
path: root/tools/checkwps
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-08-21 19:12:03 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-08-21 19:12:03 +0000
commitd0d1c8321a8f94af2537652bc1ba97300acd7e2e (patch)
treea291d4038b8456b171f95e3693ea0dcd2d15f4b9 /tools/checkwps
parent876db6c2fcb6d84a9c02b5aa7fbd60dbc78548a5 (diff)
downloadrockbox-d0d1c8321a8f94af2537652bc1ba97300acd7e2e.tar.gz
rockbox-d0d1c8321a8f94af2537652bc1ba97300acd7e2e.zip
Fix checkwps for remote screens
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22452 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps')
-rw-r--r--tools/checkwps/checkwps.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 0b6a8cb759..4cb2652c91 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -21,6 +21,7 @@
21 21
22#include <stdio.h> 22#include <stdio.h>
23#include <stdlib.h> 23#include <stdlib.h>
24#include <string.h>
24#include "config.h" 25#include "config.h"
25#include "checkwps.h" 26#include "checkwps.h"
26#include "resize.h" 27#include "resize.h"
@@ -222,12 +223,13 @@ struct screen screens[NB_SCREENS] =
222 .lcdheight=LCD_REMOTE_HEIGHT, 223 .lcdheight=LCD_REMOTE_HEIGHT,
223 .depth=LCD_REMOTE_DEPTH, 224 .depth=LCD_REMOTE_DEPTH,
224 .is_color=false,/* No color remotes yet */ 225 .is_color=false,/* No color remotes yet */
225 .getwidth = remote_getwidth, 226 .getwidth=remote_getwidth,
226 .getheight = remote_getheight, 227 .getheight=remote_getheight,
227#if LCD_REMOTE_DEPTH > 1 228#if LCD_REMOTE_DEPTH > 1
228 .get_foreground=dummy_func2, 229 .get_foreground=dummy_func2,
229 .get_background=dummy_func2, 230 .get_background=dummy_func2,
230#endif 231#endif
232 .backdrop_load=backdrop_load,
231 } 233 }
232#endif 234#endif
233}; 235};
@@ -356,7 +358,7 @@ const char* viewport_parse_viewport(struct viewport *vp,
356 PL_FG, 358 PL_FG,
357 PL_BG, 359 PL_BG,
358 }; 360 };
359 361
360 /* Work out the depth of this display */ 362 /* Work out the depth of this display */
361 depth = screens[screen].depth; 363 depth = screens[screen].depth;
362#if (LCD_DEPTH == 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH == 1) 364#if (LCD_DEPTH == 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH == 1)
@@ -429,6 +431,7 @@ int main(int argc, char **argv)
429 int filearg = 1; 431 int filearg = 1;
430 432
431 struct wps_data wps; 433 struct wps_data wps;
434 struct screen* wps_screen;
432 435
433 /* No arguments -> print the help text 436 /* No arguments -> print the help text
434 * Also print the help text upon -h or --help */ 437 * Also print the help text upon -h or --help */
@@ -460,7 +463,18 @@ int main(int argc, char **argv)
460 * flawed wps */ 463 * flawed wps */
461 while (argv[filearg]) { 464 while (argv[filearg]) {
462 printf("Checking %s...\n", argv[filearg]); 465 printf("Checking %s...\n", argv[filearg]);
463 res = skin_data_load(&wps, &screens[SCREEN_MAIN], argv[filearg], true); 466 if(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0)
467 {
468 wps_screen = &screens[SCREEN_REMOTE];
469 wps.remote_wps = true;
470 }
471 else
472 {
473 wps_screen = &screens[SCREEN_MAIN];
474 wps.remote_wps = false;
475 }
476
477 res = skin_data_load(&wps, wps_screen, argv[filearg], true);
464 478
465 if (!res) { 479 if (!res) {
466 printf("WPS parsing failure\n"); 480 printf("WPS parsing failure\n");