From 93b5f92c5369369806d551c14ddc55a4f40ce451 Mon Sep 17 00:00:00 2001 From: Kjell Ericson Date: Mon, 21 Oct 2002 20:12:55 +0000 Subject: The window zooming is now depending on LCD_WIDTH and LCD_HEIGHT. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2730 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/x11/uibasic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'uisimulator/x11/uibasic.c') diff --git a/uisimulator/x11/uibasic.c b/uisimulator/x11/uibasic.c index 9af9eb4331..78ba500b6d 100644 --- a/uisimulator/x11/uibasic.c +++ b/uisimulator/x11/uibasic.c @@ -45,8 +45,7 @@ GC draw_gc; static Colormap cmap; -static long maxx, maxy; -static int display_zoom=2; +static int display_zoom=1; Display *dpy; Window window; @@ -80,17 +79,18 @@ void init_window () get_pixel_resource ("foreground", "Foreground", dpy, cmap); draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); - screen_resized(200, 100); + screen_resized(LCD_WIDTH, LCD_HEIGHT); } void screen_resized(int width, int height) { - maxx = width-1; - maxy = height-1; + int maxx, maxy; + maxx = width; + maxy = height; - display_zoom = maxy/64; - if (maxx/120 < display_zoom) - display_zoom = maxx/120; + display_zoom = maxy/LCD_HEIGHT; + if (maxx/LCD_WIDTH < display_zoom) + display_zoom = maxx/LCD_WIDTH; if (display_zoom<1) display_zoom = 1; XSetForeground (dpy, draw_gc, get_pixel_resource ("background", "Background", -- cgit v1.2.3