summaryrefslogtreecommitdiff
path: root/uisimulator/x11/screenhack.c
diff options
context:
space:
mode:
authorKjell Ericson <kjell@haxx.se>2002-10-28 20:02:30 +0000
committerKjell Ericson <kjell@haxx.se>2002-10-28 20:02:30 +0000
commitdbab14de1f7628dea193eb45143a44ec961fddc9 (patch)
tree65f57ce5f090a471b9ab601e58ce8242ed587444 /uisimulator/x11/screenhack.c
parent32622072237b108b6926d40c75053d8fd1afb017 (diff)
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/x11/screenhack.c')
-rw-r--r--uisimulator/x11/screenhack.c23
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 @@
# define _tolower(c) ((c) - 'A' + 'a')
#endif
+char having_new_lcd=True;
char *progname;
XrmDatabase db;
@@ -87,7 +88,7 @@ static char *default_defaults[] = {
#ifdef HAVE_LCD_BITMAP
"120x68"
#else
- "264x128"
+ "280x132" /* A bit larger that necessary */
#endif
, /* this should be .geometry, but nooooo... */
"*mono: false",
@@ -212,12 +213,14 @@ int screenhack_handle_event(Display *dpy, XEvent *event, bool *release)
break;
case Expose:
{
+ /*
int x=event->xexpose.width+event->xexpose.x;
int y=event->xexpose.height+event->xexpose.y;
screen_resized(x, y);
- screen_redraw();
fprintf(stderr, "WINDOW RESIZED to width %d height %d\n",
x, y);
+ */
+ screen_redraw();
}
break;
default:
@@ -344,10 +347,18 @@ int main (int argc, char **argv)
if (argc > 1)
{
- fprintf (stderr,
- "This is the RockBox simulator. The firmware will not take\n"
- "arguements, so the simulator will not either.\n");
- exit(0);
+ int x;
+ for (x=1; x<argc; x++) {
+ if (!strcmp("--old_lcd", argv[x])) {
+ having_new_lcd=FALSE;
+ printf("Using old LCD layout.\n");
+ } else {
+ printf("rockboxui\n");
+ printf("Arguments:\n");
+ printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
+ exit(0);
+ }
+ }
}
if (CellsOfScreen (DefaultScreenOfDisplay (dpy)) <= 2)