summaryrefslogtreecommitdiff
path: root/uisimulator/win32/lcd-win32.c
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-04-27 15:20:53 +0000
committerFelix Arends <edx@rockbox.org>2002-04-27 15:20:53 +0000
commita6ca085a35fc2b1739fc8d1e6cf064b45279e8ee (patch)
tree558e54de047a1cde0ac61ab110e54a4bda69d343 /uisimulator/win32/lcd-win32.c
parent49ea8fb28140f9297a1d470e56761702a389e5b3 (diff)
removed unneeded code from lcd.c and renamed it do lcd-win32.c
updated modified constants (LCD_WIDTH, LCD_HEIGHT) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@261 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/win32/lcd-win32.c')
-rw-r--r--uisimulator/win32/lcd-win32.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
new file mode 100644
index 0000000000..4539696cef
--- /dev/null
+++ b/uisimulator/win32/lcd-win32.c
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2002 by Felix Arends
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <windows.h>
+#include <process.h>
+#include "uisw32.h"
+#include "lcd.h"
+
+//
+// simulator specific code
+//
+
+// varaibles
+unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display
+char bitmap[LCD_WIDTH][LCD_HEIGHT]; // the ui display
+
+BITMAPINFO2 bmi =
+{
+ sizeof (BITMAPINFOHEADER),
+ LCD_WIDTH, -LCD_HEIGHT, 1, 8,
+ BI_RGB, 0, 0, 0, 2, 2,
+ UI_LCD_COLOR, 0, // green background color
+ UI_LCD_BLACK, 0 // black color
+}; // bitmap information
+
+
+// lcd_init
+// init lcd controler
+void lcd_init()
+{
+ lcd_clear_display ();
+}
+
+// lcd_update
+// update lcd
+void lcd_update()
+{
+ int x, y;
+ if (hGUIWnd == NULL)
+ _endthread ();
+
+ for (x = 0; x < LCD_WIDTH; x++)
+ for (y = 0; y < LCD_HEIGHT; y++)
+ bitmap[y][x] = ((display[x][y/8] >> (y & 7)) & 1);
+
+ InvalidateRect (hGUIWnd, NULL, FALSE);
+
+ // natural sleep :)
+ Sleep (50);
+} \ No newline at end of file