diff options
author | Kjell Ericson <kjell@haxx.se> | 2002-10-21 20:12:55 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2002-10-21 20:12:55 +0000 |
commit | 93b5f92c5369369806d551c14ddc55a4f40ce451 (patch) | |
tree | cab2425d12831a57d8fc37c8a5183cfc8e960bf0 /uisimulator | |
parent | bc254fe95f255e779b716ceb5ded09bda3857a2b (diff) | |
download | rockbox-93b5f92c5369369806d551c14ddc55a4f40ce451.tar.gz rockbox-93b5f92c5369369806d551c14ddc55a4f40ce451.zip |
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
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/x11/uibasic.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 @@ | |||
45 | GC draw_gc; | 45 | GC draw_gc; |
46 | static Colormap cmap; | 46 | static Colormap cmap; |
47 | 47 | ||
48 | static long maxx, maxy; | 48 | static int display_zoom=1; |
49 | static int display_zoom=2; | ||
50 | 49 | ||
51 | Display *dpy; | 50 | Display *dpy; |
52 | Window window; | 51 | Window window; |
@@ -80,17 +79,18 @@ void init_window () | |||
80 | get_pixel_resource ("foreground", "Foreground", dpy, cmap); | 79 | get_pixel_resource ("foreground", "Foreground", dpy, cmap); |
81 | draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); | 80 | draw_gc = XCreateGC (dpy, window, GCForeground, &gcv); |
82 | 81 | ||
83 | screen_resized(200, 100); | 82 | screen_resized(LCD_WIDTH, LCD_HEIGHT); |
84 | } | 83 | } |
85 | 84 | ||
86 | void screen_resized(int width, int height) | 85 | void screen_resized(int width, int height) |
87 | { | 86 | { |
88 | maxx = width-1; | 87 | int maxx, maxy; |
89 | maxy = height-1; | 88 | maxx = width; |
89 | maxy = height; | ||
90 | 90 | ||
91 | display_zoom = maxy/64; | 91 | display_zoom = maxy/LCD_HEIGHT; |
92 | if (maxx/120 < display_zoom) | 92 | if (maxx/LCD_WIDTH < display_zoom) |
93 | display_zoom = maxx/120; | 93 | display_zoom = maxx/LCD_WIDTH; |
94 | if (display_zoom<1) | 94 | if (display_zoom<1) |
95 | display_zoom = 1; | 95 | display_zoom = 1; |
96 | XSetForeground (dpy, draw_gc, get_pixel_resource ("background", "Background", | 96 | XSetForeground (dpy, draw_gc, get_pixel_resource ("background", "Background", |