summaryrefslogtreecommitdiff
path: root/tools/checkwps/checkwps.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-11-04 05:40:10 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-11-04 05:40:10 +0000
commitde45edbdb1a387163f9763aa6dd2ce130410b4f2 (patch)
tree2abc1a0e7c37ad9e439035d4c319a8c3cd0f10fb /tools/checkwps/checkwps.c
parentdd1063d67c6a8b255058cd64a24dcb32cf3cf162 (diff)
Fix checkwps. Reimplement viewport_set_fullscreen() and viewport_set_defaults() to always return the "full display". This doesn't change anything about the skin so is fine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23510 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps/checkwps.c')
-rw-r--r--tools/checkwps/checkwps.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index b074457de7..596082a798 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -231,6 +231,23 @@ void screen_clear_area(struct screen * display, int xstart, int ystart,
}
#endif
+/* reimplement some simple stuff from viewport.c which doesnt change the skins
+ validity even if the values are not correct */
+void viewport_set_fullscreen(struct viewport *vp,
+ const enum screen_type screen)
+{
+ vp->x = 0;
+ vp->y = 0;
+ vp->width = screens[screen].lcdwidth;
+ vp->height = screens[screen].lcdheight;
+}
+
+void viewport_set_defaults(struct viewport *vp,
+ const enum screen_type screen)
+{
+ viewport_set_fullscreen(vp, screen);
+}
+
int main(int argc, char **argv)
{
@@ -238,9 +255,8 @@ int main(int argc, char **argv)
int filearg = 1;
struct wps_data wps;
-#ifdef HAVE_REMOTE_LCD
- struct screen* wps_screen = &screens[SCREEN_MAIN];
-#endif
+ enum screen_type screen = SCREEN_MAIN;
+ struct screen* wps_screen;
/* No arguments -> print the help text
* Also print the help text upon -h or --help */
@@ -275,17 +291,18 @@ int main(int argc, char **argv)
#ifdef HAVE_REMOTE_LCD
if(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0)
{
- wps_screen = &screens[SCREEN_REMOTE];
+ screen = SCREEN_REMOTE;
wps.remote_wps = true;
}
else
{
- wps_screen = &screens[SCREEN_MAIN];
+ screen = SCREEN_MAIN;
wps.remote_wps = false;
}
-#endif
+#endif
+ wps_screen = &screens[screen];
- res = skin_data_load(&wps, argv[filearg], true);
+ res = skin_data_load(screen, &wps, argv[filearg], true);
if (!res) {
printf("WPS parsing failure\n");