aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/multiple
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-10-19 15:36:05 +1000
committerinmarket <andrewh@inmarket.com.au>2013-10-19 15:36:05 +1000
commit87a6af81f4edd9f638238d785aae716749a7fc13 (patch)
tree0da0bcebb880331f2a1c4aeb6d911c9398d5b190 /drivers/multiple
parent443d14c21f10fea9b0c6fc5559ec4c6b31f99546 (diff)
downloaduGFX-87a6af81f4edd9f638238d785aae716749a7fc13.tar.gz
uGFX-87a6af81f4edd9f638238d785aae716749a7fc13.tar.bz2
uGFX-87a6af81f4edd9f638238d785aae716749a7fc13.zip
Change to gdisp low level driver API. Display number is now in the GDriver structure (It was required for a Nokia driver).
Diffstat (limited to 'drivers/multiple')
-rw-r--r--drivers/multiple/Win32/gdisp_lld.c10
-rw-r--r--drivers/multiple/X/gdisp_lld.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/multiple/Win32/gdisp_lld.c b/drivers/multiple/Win32/gdisp_lld.c
index dae92821..6c2e7f33 100644
--- a/drivers/multiple/Win32/gdisp_lld.c
+++ b/drivers/multiple/Win32/gdisp_lld.c
@@ -381,7 +381,7 @@ static DECLARE_THREAD_FUNCTION(WindowThread, param) {
/* Driver exported functions. */
/*===========================================================================*/
-LLDSPEC bool_t gdisp_lld_init(GDisplay *g, unsigned display) {
+LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
winPriv * priv;
char buf[132];
@@ -426,13 +426,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g, unsigned display) {
// Turn on toggles for the first GINPUT_TOGGLE_CONFIG_ENTRIES windows
#if GINPUT_NEED_TOGGLE
- if (display < GINPUT_TOGGLE_CONFIG_ENTRIES)
+ if (g->controllerdisplay < GINPUT_TOGGLE_CONFIG_ENTRIES)
g->flags |= GDISP_FLG_HASTOGGLE;
#endif
// Only turn on mouse on the first window for now
#if GINPUT_NEED_MOUSE
- if (!display)
+ if (!g->controllerdisplay)
g->flags |= GDISP_FLG_HASMOUSE;
#endif
@@ -443,13 +443,13 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g, unsigned display) {
g->priv = priv;
// Create the window in the message thread
- PostThreadMessage(winThreadId, WM_USER, (WPARAM)display, (LPARAM)g);
+ PostThreadMessage(winThreadId, WM_USER, (WPARAM)g->controllerdisplay, (LPARAM)g);
// Wait for the window creation to complete (for safety)
while(!(((volatile GDisplay *)g)->flags & GDISP_FLG_READY))
Sleep(1);
- sprintf(buf, APP_NAME " - %u", display+1);
+ sprintf(buf, APP_NAME " - %u", g->systemdisplay+1);
SetWindowText(priv->hwnd, buf);
ShowWindow(priv->hwnd, SW_SHOW);
UpdateWindow(priv->hwnd);
diff --git a/drivers/multiple/X/gdisp_lld.c b/drivers/multiple/X/gdisp_lld.c
index fc573c87..188724ed 100644
--- a/drivers/multiple/X/gdisp_lld.c
+++ b/drivers/multiple/X/gdisp_lld.c
@@ -145,7 +145,7 @@ static int FatalXIOError(Display *d) {
exit(0);
}
-LLDSPEC bool_t gdisp_lld_init(GDisplay *g, unsigned display) {
+LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
XSizeHints *pSH;
XSetWindowAttributes xa;
XTextProperty WindowTitle;
@@ -208,7 +208,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g, unsigned display) {
{
char buf[132];
- sprintf(buf, "uGFX - %u", display+1);
+ sprintf(buf, "uGFX - %u", g->systemdisplay+1);
WindowTitleText = buf;
XStringListToTextProperty(&WindowTitleText, 1, &WindowTitle);
XSetWMName(dis, priv->win, &WindowTitle);