diff options
author | Kjell Ericson <kjell@haxx.se> | 2002-10-28 20:02:30 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2002-10-28 20:02:30 +0000 |
commit | dbab14de1f7628dea193eb45143a44ec961fddc9 (patch) | |
tree | 65f57ce5f090a471b9ab601e58ce8242ed587444 /uisimulator | |
parent | 32622072237b108b6926d40c75053d8fd1afb017 (diff) | |
download | rockbox-dbab14de1f7628dea193eb45143a44ec961fddc9.tar.gz rockbox-dbab14de1f7628dea193eb45143a44ec961fddc9.zip |
Added command line parameter "--old_lcd" that will simulate the old LCD of
the player.
Made the screen a bit larger too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2761 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/x11/screenhack.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/uisimulator/x11/screenhack.c b/uisimulator/x11/screenhack.c index 1dfc12448c..37c5d2061a 100644 --- a/uisimulator/x11/screenhack.c +++ b/uisimulator/x11/screenhack.c | |||
@@ -64,6 +64,7 @@ | |||
64 | # define _tolower(c) ((c) - 'A' + 'a') | 64 | # define _tolower(c) ((c) - 'A' + 'a') |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | char having_new_lcd=True; | ||
67 | 68 | ||
68 | char *progname; | 69 | char *progname; |
69 | XrmDatabase db; | 70 | XrmDatabase db; |
@@ -87,7 +88,7 @@ static char *default_defaults[] = { | |||
87 | #ifdef HAVE_LCD_BITMAP | 88 | #ifdef HAVE_LCD_BITMAP |
88 | "120x68" | 89 | "120x68" |
89 | #else | 90 | #else |
90 | "264x128" | 91 | "280x132" /* A bit larger that necessary */ |
91 | #endif | 92 | #endif |
92 | , /* this should be .geometry, but nooooo... */ | 93 | , /* this should be .geometry, but nooooo... */ |
93 | "*mono: false", | 94 | "*mono: false", |
@@ -212,12 +213,14 @@ int screenhack_handle_event(Display *dpy, XEvent *event, bool *release) | |||
212 | break; | 213 | break; |
213 | case Expose: | 214 | case Expose: |
214 | { | 215 | { |
216 | /* | ||
215 | int x=event->xexpose.width+event->xexpose.x; | 217 | int x=event->xexpose.width+event->xexpose.x; |
216 | int y=event->xexpose.height+event->xexpose.y; | 218 | int y=event->xexpose.height+event->xexpose.y; |
217 | screen_resized(x, y); | 219 | screen_resized(x, y); |
218 | screen_redraw(); | ||
219 | fprintf(stderr, "WINDOW RESIZED to width %d height %d\n", | 220 | fprintf(stderr, "WINDOW RESIZED to width %d height %d\n", |
220 | x, y); | 221 | x, y); |
222 | */ | ||
223 | screen_redraw(); | ||
221 | } | 224 | } |
222 | break; | 225 | break; |
223 | default: | 226 | default: |
@@ -344,10 +347,18 @@ int main (int argc, char **argv) | |||
344 | 347 | ||
345 | if (argc > 1) | 348 | if (argc > 1) |
346 | { | 349 | { |
347 | fprintf (stderr, | 350 | int x; |
348 | "This is the RockBox simulator. The firmware will not take\n" | 351 | for (x=1; x<argc; x++) { |
349 | "arguements, so the simulator will not either.\n"); | 352 | if (!strcmp("--old_lcd", argv[x])) { |
350 | exit(0); | 353 | having_new_lcd=FALSE; |
354 | printf("Using old LCD layout.\n"); | ||
355 | } else { | ||
356 | printf("rockboxui\n"); | ||
357 | printf("Arguments:\n"); | ||
358 | printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n"); | ||
359 | exit(0); | ||
360 | } | ||
361 | } | ||
351 | } | 362 | } |
352 | 363 | ||
353 | if (CellsOfScreen (DefaultScreenOfDisplay (dpy)) <= 2) | 364 | if (CellsOfScreen (DefaultScreenOfDisplay (dpy)) <= 2) |