diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-04 05:40:10 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-04 05:40:10 +0000 |
commit | de45edbdb1a387163f9763aa6dd2ce130410b4f2 (patch) | |
tree | 2abc1a0e7c37ad9e439035d4c319a8c3cd0f10fb /tools | |
parent | dd1063d67c6a8b255058cd64a24dcb32cf3cf162 (diff) | |
download | rockbox-de45edbdb1a387163f9763aa6dd2ce130410b4f2.tar.gz rockbox-de45edbdb1a387163f9763aa6dd2ce130410b4f2.zip |
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')
-rw-r--r-- | tools/checkwps/checkwps.c | 31 |
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, | |||
231 | } | 231 | } |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | /* reimplement some simple stuff from viewport.c which doesnt change the skins | ||
235 | validity even if the values are not correct */ | ||
236 | void viewport_set_fullscreen(struct viewport *vp, | ||
237 | const enum screen_type screen) | ||
238 | { | ||
239 | vp->x = 0; | ||
240 | vp->y = 0; | ||
241 | vp->width = screens[screen].lcdwidth; | ||
242 | vp->height = screens[screen].lcdheight; | ||
243 | } | ||
244 | |||
245 | void viewport_set_defaults(struct viewport *vp, | ||
246 | const enum screen_type screen) | ||
247 | { | ||
248 | viewport_set_fullscreen(vp, screen); | ||
249 | } | ||
250 | |||
234 | 251 | ||
235 | int main(int argc, char **argv) | 252 | int main(int argc, char **argv) |
236 | { | 253 | { |
@@ -238,9 +255,8 @@ int main(int argc, char **argv) | |||
238 | int filearg = 1; | 255 | int filearg = 1; |
239 | 256 | ||
240 | struct wps_data wps; | 257 | struct wps_data wps; |
241 | #ifdef HAVE_REMOTE_LCD | 258 | enum screen_type screen = SCREEN_MAIN; |
242 | struct screen* wps_screen = &screens[SCREEN_MAIN]; | 259 | struct screen* wps_screen; |
243 | #endif | ||
244 | 260 | ||
245 | /* No arguments -> print the help text | 261 | /* No arguments -> print the help text |
246 | * Also print the help text upon -h or --help */ | 262 | * Also print the help text upon -h or --help */ |
@@ -275,17 +291,18 @@ int main(int argc, char **argv) | |||
275 | #ifdef HAVE_REMOTE_LCD | 291 | #ifdef HAVE_REMOTE_LCD |
276 | if(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0) | 292 | if(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0) |
277 | { | 293 | { |
278 | wps_screen = &screens[SCREEN_REMOTE]; | 294 | screen = SCREEN_REMOTE; |
279 | wps.remote_wps = true; | 295 | wps.remote_wps = true; |
280 | } | 296 | } |
281 | else | 297 | else |
282 | { | 298 | { |
283 | wps_screen = &screens[SCREEN_MAIN]; | 299 | screen = SCREEN_MAIN; |
284 | wps.remote_wps = false; | 300 | wps.remote_wps = false; |
285 | } | 301 | } |
286 | #endif | 302 | #endif |
303 | wps_screen = &screens[screen]; | ||
287 | 304 | ||
288 | res = skin_data_load(&wps, argv[filearg], true); | 305 | res = skin_data_load(screen, &wps, argv[filearg], true); |
289 | 306 | ||
290 | if (!res) { | 307 | if (!res) { |
291 | printf("WPS parsing failure\n"); | 308 | printf("WPS parsing failure\n"); |