1
0
Fork 0
forked from len0rd/rockbox

Fix checkwps for remote screens

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22452 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2009-08-21 19:12:03 +00:00
parent 876db6c2fc
commit d0d1c8321a

View file

@ -21,6 +21,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "config.h" #include "config.h"
#include "checkwps.h" #include "checkwps.h"
#include "resize.h" #include "resize.h"
@ -228,6 +229,7 @@ struct screen screens[NB_SCREENS] =
.get_foreground=dummy_func2, .get_foreground=dummy_func2,
.get_background=dummy_func2, .get_background=dummy_func2,
#endif #endif
.backdrop_load=backdrop_load,
} }
#endif #endif
}; };
@ -429,6 +431,7 @@ int main(int argc, char **argv)
int filearg = 1; int filearg = 1;
struct wps_data wps; struct wps_data wps;
struct screen* wps_screen;
/* No arguments -> print the help text /* No arguments -> print the help text
* Also print the help text upon -h or --help */ * Also print the help text upon -h or --help */
@ -460,7 +463,18 @@ int main(int argc, char **argv)
* flawed wps */ * flawed wps */
while (argv[filearg]) { while (argv[filearg]) {
printf("Checking %s...\n", argv[filearg]); printf("Checking %s...\n", argv[filearg]);
res = skin_data_load(&wps, &screens[SCREEN_MAIN], argv[filearg], true); if(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0)
{
wps_screen = &screens[SCREEN_REMOTE];
wps.remote_wps = true;
}
else
{
wps_screen = &screens[SCREEN_MAIN];
wps.remote_wps = false;
}
res = skin_data_load(&wps, wps_screen, argv[filearg], true);
if (!res) { if (!res) {
printf("WPS parsing failure\n"); printf("WPS parsing failure\n");