summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_parm.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-26 13:37:42 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-26 13:37:42 +0000
commit6a972e02497d3015236189f72931c3d59fa51755 (patch)
tree0c0185dd66b47d7d1ee2d91e4a3ffb6dbabcc7d1 /apps/plugins/lib/gray_parm.c
parent14fe89aa8d2ef05595bdba0e0b78f021f3e8d087 (diff)
downloadrockbox-6a972e02497d3015236189f72931c3d59fa51755.tar.gz
rockbox-6a972e02497d3015236189f72931c3d59fa51755.zip
Finally - grayscale library support for the simulators. Currently SDL only, win32 and x11 won't link anymore due to missing simulator functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8845 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/gray_parm.c')
-rw-r--r--apps/plugins/lib/gray_parm.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/plugins/lib/gray_parm.c b/apps/plugins/lib/gray_parm.c
index 77156852c5..c6305421c1 100644
--- a/apps/plugins/lib/gray_parm.c
+++ b/apps/plugins/lib/gray_parm.c
@@ -10,10 +10,10 @@
10* Greyscale framework 10* Greyscale framework
11* Parameter handling 11* Parameter handling
12* 12*
13* This is a generic framework to use grayscale display within Rockbox 13* This is a generic framework to display up to 33 shades of grey
14* plugins. It obviously does not work for the player. 14* on low-depth bitmap LCDs (Archos b&w, Iriver 4-grey) within plugins.
15* 15*
16* Copyright (C) 2004-2005 Jens Arnold 16* Copyright (C) 2004-2006 Jens Arnold
17* 17*
18* All files in this archive are subject to the GNU General Public License. 18* All files in this archive are subject to the GNU General Public License.
19* See the file COPYING in the source tree root for full license agreement. 19* See the file COPYING in the source tree root for full license agreement.
@@ -23,10 +23,9 @@
23* 23*
24****************************************************************************/ 24****************************************************************************/
25 25
26#ifndef SIMULATOR /* not for simulator by now */
27#include "plugin.h" 26#include "plugin.h"
28 27
29#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ 28#ifdef HAVE_LCD_BITMAP
30#include "gray.h" 29#include "gray.h"
31 30
32/* Set position of the top left corner of the greyscale overlay 31/* Set position of the top left corner of the greyscale overlay
@@ -37,7 +36,14 @@ void gray_set_position(int x, int by)
37 _gray_info.by = by; 36 _gray_info.by = by;
38 37
39 if (_gray_info.flags & _GRAY_RUNNING) 38 if (_gray_info.flags & _GRAY_RUNNING)
39 {
40#ifdef SIMULATOR
41 gray_deferred_lcd_update();
42 gray_update();
43#else
40 _gray_info.flags |= _GRAY_DEFERRED_UPDATE; 44 _gray_info.flags |= _GRAY_DEFERRED_UPDATE;
45#endif
46 }
41} 47}
42 48
43/* Set the draw mode for subsequent drawing operations */ 49/* Set the draw mode for subsequent drawing operations */
@@ -103,5 +109,3 @@ int gray_getstringsize(const unsigned char *str, int *w, int *h)
103} 109}
104 110
105#endif /* HAVE_LCD_BITMAP */ 111#endif /* HAVE_LCD_BITMAP */
106#endif /* !SIMULATOR */
107