aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-12-11 00:38:42 +1000
committerinmarket <andrewh@inmarket.com.au>2013-12-11 00:38:42 +1000
commit4dc9bf34a72bcc857c06a629fbea0bb94647bc14 (patch)
treeba6d928fb0a9916f0ab60f27fc251aee0777169c /drivers/multiple
parentda8a79bd2457c1eafbb9bd152e36ba6bdc4536f2 (diff)
downloaduGFX-4dc9bf34a72bcc857c06a629fbea0bb94647bc14.tar.gz
uGFX-4dc9bf34a72bcc857c06a629fbea0bb94647bc14.tar.bz2
uGFX-4dc9bf34a72bcc857c06a629fbea0bb94647bc14.zip
New versions of mingw use Red, Green Blue so we need to undefine them in certain places.
This should really be fixed by renaming Red, Green, Blue as the names are too common however this would create compatibility problems.
Diffstat (limited to 'drivers/multiple')
-rw-r--r--drivers/multiple/Win32/gdisp_lld_Win32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/multiple/Win32/gdisp_lld_Win32.c b/drivers/multiple/Win32/gdisp_lld_Win32.c
index adeed579..eb74f4bf 100644
--- a/drivers/multiple/Win32/gdisp_lld_Win32.c
+++ b/drivers/multiple/Win32/gdisp_lld_Win32.c
@@ -42,6 +42,11 @@
#define DISPLAY_X_OFFSET 50
#define DISPLAY_Y_OFFSET 50
+#undef Red
+#undef Green
+#undef Blue
+
+#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -420,7 +425,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
// Wait for our thread to be ready
while (!QReady)
- Sleep(1);
+ gfxSleepMilliseconds(1);
}
// Initialise the GDISP structure
@@ -461,7 +466,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
// Wait for the window creation to complete (for safety)
while(!(((volatile GDisplay *)g)->flags & GDISP_FLG_READY))
- Sleep(1);
+ gfxSleepMilliseconds(1);
sprintf(buf, APP_NAME " - %u", g->systemdisplay+1);
SetWindowText(priv->hwnd, buf);