diff options
Diffstat (limited to 'drivers/multiple')
-rw-r--r-- | drivers/multiple/SDL/gdisp_lld_SDL.c | 28 | ||||
-rw-r--r-- | drivers/multiple/Win32/gdisp_lld_Win32.c | 24 | ||||
-rw-r--r-- | drivers/multiple/Win32/gdisp_lld_config.h | 4 | ||||
-rw-r--r-- | drivers/multiple/X/gdisp_lld_X.c | 12 | ||||
-rw-r--r-- | drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c | 34 | ||||
-rw-r--r-- | drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp | 38 |
6 files changed, 70 insertions, 70 deletions
diff --git a/drivers/multiple/SDL/gdisp_lld_SDL.c b/drivers/multiple/SDL/gdisp_lld_SDL.c index e594e649..e306dd7f 100644 --- a/drivers/multiple/SDL/gdisp_lld_SDL.c +++ b/drivers/multiple/SDL/gdisp_lld_SDL.c @@ -79,7 +79,7 @@ // Forward definitions static gBool SDL_KeyboardInit(GKeyboard *k, unsigned driverinstance); - static int SDL_KeyboardGetData(GKeyboard *k, uint8_t *pch, int sz); + static int SDL_KeyboardGetData(GKeyboard *k, gU8 *pch, int sz); const GKeyboardVMT GKEYBOARD_DRIVER_VMT[1] = {{ { @@ -97,7 +97,7 @@ static struct KeyMap { SDL_Keycode k_sdl; - uint16_t k_ugfx; + gU16 k_ugfx; } SDL_keymap[] = { {SDLK_UP, GKEY_UP}, @@ -136,7 +136,7 @@ }; static struct ModMap { SDL_Keycode s_sdl; - uint32_t s_ugfx; + gU32 s_ugfx; } SDL_modmap[] = { {KMOD_LSHIFT, GKEYSTATE_SHIFT_L}, {KMOD_RSHIFT, GKEYSTATE_SHIFT_R}, @@ -149,23 +149,23 @@ {0,0} }; struct SDL_keymsg { - uint32_t key; - uint32_t keystate; + gU32 key; + gU32 keystate; }; static GKeyboard *keyboard = 0; #endif // shared IPC context struct SDL_UGFXContext { - uint32_t framebuf[GDISP_SCREEN_WIDTH*GDISP_SCREEN_HEIGHT]; - int16_t need_redraw; + gU32 framebuf[GDISP_SCREEN_WIDTH*GDISP_SCREEN_HEIGHT]; + gI16 need_redraw; int minx,miny,maxx,maxy; #if GINPUT_NEED_MOUSE gCoord mousex, mousey; - uint16_t buttons; + gU16 buttons; #endif #if GINPUT_NEED_KEYBOARD - uint16_t keypos; + gU16 keypos; struct SDL_keymsg keybuffer[8]; #endif }; @@ -198,7 +198,7 @@ static int SDL_loop (void) { context->maxx = 0; context->maxy = 0; - SDL_UpdateTexture(texture, &r, context->framebuf+r.y*GDISP_SCREEN_WIDTH+r.x, GDISP_SCREEN_WIDTH*sizeof(uint32_t)); + SDL_UpdateTexture(texture, &r, context->framebuf+r.y*GDISP_SCREEN_WIDTH+r.x, GDISP_SCREEN_WIDTH*sizeof(gU32)); SDL_RenderCopy(render, texture, 0, 0); SDL_RenderPresent(render); } @@ -249,8 +249,8 @@ static int SDL_loop (void) { case SDL_KEYDOWN: case SDL_KEYUP: { SDL_Keycode k_sdl = event.key.keysym.sym; - uint8_t k_ugfx = 0; - uint32_t s_ugfx = (event.type==SDL_KEYDOWN)?0:GKEYSTATE_KEYUP; + gU8 k_ugfx = 0; + gU32 s_ugfx = (event.type==SDL_KEYDOWN)?0:GKEYSTATE_KEYUP; int i; if (!(k_sdl & ~0x7f) && (k_sdl <32 || k_sdl == 127)) { k_ugfx = k_sdl; @@ -409,7 +409,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) LLDCOLOR_TYPE c = gdispColor2Native(g->p.color); if (context) { int x,y; - uint32_t *pbuf = context->framebuf + g->p.y*GDISP_SCREEN_WIDTH + g->p.x; + gU32 *pbuf = context->framebuf + g->p.y*GDISP_SCREEN_WIDTH + g->p.x; int dy = GDISP_SCREEN_WIDTH - g->p.cx; for (y = 0; y < g->p.cy; ++y) { for (x = 0; x < g->p.cx; ++x) @@ -458,7 +458,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) return gTrue; } - static int SDL_KeyboardGetData(GKeyboard *k, uint8_t *pch, int sz) { + static int SDL_KeyboardGetData(GKeyboard *k, gU8 *pch, int sz) { int i = 0; if (!context || !context->keypos || !sz) return 0; diff --git a/drivers/multiple/Win32/gdisp_lld_Win32.c b/drivers/multiple/Win32/gdisp_lld_Win32.c index cd8eb512..1ec52a37 100644 --- a/drivers/multiple/Win32/gdisp_lld_Win32.c +++ b/drivers/multiple/Win32/gdisp_lld_Win32.c @@ -144,11 +144,11 @@ #include "../../../src/ginput/ginput_keyboard_microcode.h" // Forward definitions - extern uint8_t GKEYBOARD_WIN32_DEFAULT_LAYOUT[]; + extern gU8 GKEYBOARD_WIN32_DEFAULT_LAYOUT[]; // This is the layout code for the English US keyboard. // We make it public so that a user can switch to a different layout if required. - uint8_t KeyboardLayout_Win32_US[] = { + gU8 KeyboardLayout_Win32_US[] = { KMC_HEADERSTART, KMC_HEADER_ID1, KMC_HEADER_ID2, KMC_HEADER_VER_1, // Transient Shifters: SHIFT, CTRL, ALT, WINKEY @@ -391,7 +391,7 @@ // Forward definitions static gBool Win32KeyboardInit(GKeyboard *k, unsigned driverinstance); - static int Win32KeyboardGetData(GKeyboard *k, uint8_t *pch, int sz); + static int Win32KeyboardGetData(GKeyboard *k, gU8 *pch, int sz); const GKeyboardVMT const GKEYBOARD_DRIVER_VMT[1] = {{ { @@ -415,7 +415,7 @@ }}; static int keypos; - static uint8_t keybuffer[8]; + static gU8 keybuffer[8]; static GKeyboard *keyboard; #endif @@ -443,13 +443,13 @@ typedef struct winPriv { HBITMAP dcOldBitmap; #if GFX_USE_GINPUT && GINPUT_NEED_MOUSE gCoord mousex, mousey; - uint16_t mousebuttons; + gU16 mousebuttons; GMouse *mouse; gBool mouseenabled; - void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y); + void (*capfn)(void * hWnd, GDisplay *g, gU16 buttons, gCoord x, gCoord y); #endif #if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE - uint8_t toggles; + gU8 toggles; #endif #if GDISP_HARDWARE_STREAM_WRITE || GDISP_HARDWARE_STREAM_READ gCoord x0, y0, x1, y1; @@ -462,7 +462,7 @@ void gfxEmulatorSetParentWindow(void *hwnd) { } #if GFX_USE_GINPUT && GINPUT_NEED_MOUSE - void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, gCoord x, gCoord y) { + void gfxEmulatorMouseInject(GDisplay *g, gU16 buttons, gCoord x, gCoord y) { winPriv * priv; priv = (winPriv *)g->priv; @@ -475,7 +475,7 @@ void gfxEmulatorSetParentWindow(void *hwnd) { void gfxEmulatorMouseEnable(GDisplay *g, gBool enabled) { ((winPriv *)g->priv)->mouseenabled = enabled; } - void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y)) { + void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, gU16 buttons, gCoord x, gCoord y)) { ((winPriv *)g->priv)->capfn = capfn; } #endif @@ -487,7 +487,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) GDisplay * g; winPriv * priv; #if GFX_USE_GINPUT && GINPUT_NEED_MOUSE - uint16_t btns; + gU16 btns; #endif #if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE HBRUSH hbrOn, hbrOff; @@ -496,7 +496,7 @@ static LRESULT myWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) HGDIOBJ old; POINT p; gCoord pos; - uint8_t bit; + gU8 bit; #endif switch (Msg) { @@ -1611,7 +1611,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { return gTrue; } - static int Win32KeyboardGetData(GKeyboard *k, uint8_t *pch, int sz) { + static int Win32KeyboardGetData(GKeyboard *k, gU8 *pch, int sz) { int i, j; (void) k; diff --git a/drivers/multiple/Win32/gdisp_lld_config.h b/drivers/multiple/Win32/gdisp_lld_config.h index 0eefe49a..9f6f38fe 100644 --- a/drivers/multiple/Win32/gdisp_lld_config.h +++ b/drivers/multiple/Win32/gdisp_lld_config.h @@ -55,14 +55,14 @@ void gfxEmulatorSetParentWindow(void *hwnd); #if GINPUT_NEED_MOUSE // This function allows you to inject mouse events into the ugfx mouse driver - void gfxEmulatorMouseInject(GDisplay *g, uint16_t buttons, gCoord x, gCoord y); + void gfxEmulatorMouseInject(GDisplay *g, gU16 buttons, gCoord x, gCoord y); // This function enables you to turn on/off normal mouse functions on a ugfx Win32 display window. void gfxEmulatorMouseEnable(GDisplay *g, gBool enabled); // This function enables you to capture mouse events on a ugfx Win32 display window. // Passing NULL turns off the capture - void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, uint16_t buttons, gCoord x, gCoord y)); + void gfxEmulatorMouseCapture(GDisplay *g, void (*capfn)(void * hWnd, GDisplay *g, gU16 buttons, gCoord x, gCoord y)); #endif #endif /* GFX_USE_GDISP */ diff --git a/drivers/multiple/X/gdisp_lld_X.c b/drivers/multiple/X/gdisp_lld_X.c index d4f7f3da..ace906a7 100644 --- a/drivers/multiple/X/gdisp_lld_X.c +++ b/drivers/multiple/X/gdisp_lld_X.c @@ -106,14 +106,14 @@ #endif // Forward definitions - extern uint8_t GKEYBOARD_X_DEFAULT_LAYOUT[]; + extern gU8 GKEYBOARD_X_DEFAULT_LAYOUT[]; #include "../../../src/ginput/ginput_keyboard_microcode.h" #include <X11/keysym.h> // This is the layout code for the English US keyboard. // We make it public so that a user can switch to a different layout if required. - uint8_t KeyboardLayout_X_US[] = { + gU8 KeyboardLayout_X_US[] = { KMC_HEADERSTART, KMC_HEADER_ID1, KMC_HEADER_ID2, KMC_HEADER_VER_1, // TODO @@ -141,7 +141,7 @@ // Forward definitions static gBool XKeyboardInit(GKeyboard *k, unsigned driverinstance); - static int XKeyboardGetData(GKeyboard *k, uint8_t *pch, int sz); + static int XKeyboardGetData(GKeyboard *k, gU8 *pch, int sz); const GKeyboardVMT const GKEYBOARD_DRIVER_VMT[1] = {{ { @@ -163,7 +163,7 @@ }}; static int keypos; - static uint8_t keybuffer[8]; + static gU8 keybuffer[8]; static GKeyboard *keyboard; #endif @@ -182,7 +182,7 @@ typedef struct xPriv { Window win; #if GINPUT_NEED_MOUSE gCoord mousex, mousey; - uint16_t buttons; + gU16 buttons; GMouse * mouse; #endif } xPriv; @@ -509,7 +509,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) return gTrue; } - static int XKeyboardGetData(GKeyboard *k, uint8_t *pch, int sz) { + static int XKeyboardGetData(GKeyboard *k, gU8 *pch, int sz) { int i, j; (void) k; diff --git a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c index ffd3b1f9..a5bfbd97 100644 --- a/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c +++ b/drivers/multiple/uGFXnet/gdisp_lld_uGFXnet.c @@ -157,10 +157,10 @@ typedef struct netPriv { SOCKET_TYPE netfd; // The current socket unsigned databytes; // How many bytes have been read - uint16_t data[2]; // Buffer for storing data read. + gU16 data[2]; // Buffer for storing data read. #if GINPUT_NEED_MOUSE gCoord mousex, mousey; - uint16_t mousebuttons; + gU16 mousebuttons; GMouse * mouse; #endif } netPriv; @@ -180,19 +180,19 @@ static gThread hThread; /** * Send a whole packet of data. - * Len is specified in the number of uint16_t's we want to send as our protocol only talks uint16_t's. + * Len is specified in the number of gU16's we want to send as our protocol only talks gU16's. * Note that contents of the packet are modified to ensure it will cross the wire in the correct format. * If the connection closes before we send all the data - the call returns gFalse. */ -static gBool sendpkt(SOCKET_TYPE netfd, uint16_t *pkt, int len) { +static gBool sendpkt(SOCKET_TYPE netfd, gU16 *pkt, int len) { int i; - // Convert each uint16_t to network order + // Convert each gU16 to network order for(i = 0; i < len; i++) pkt[i] = htons(pkt[i]); // Send it - len *= sizeof(uint16_t); + len *= sizeof(gU16); return send(netfd, (const char *)pkt, len, 0) == len; } @@ -465,7 +465,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_FLUSH LLDSPEC void gdisp_lld_flush(GDisplay *g) { netPriv * priv; - uint16_t buf[1]; + gU16 buf[1]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -486,7 +486,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_DRAWPIXEL LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { netPriv * priv; - uint16_t buf[4]; + gU16 buf[4]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -512,7 +512,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_FILLS LLDSPEC void gdisp_lld_fill_area(GDisplay *g) { netPriv * priv; - uint16_t buf[6]; + gU16 buf[6]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -539,7 +539,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { netPriv * priv; gPixel * buffer; - uint16_t buf[5]; + gU16 buf[5]; gCoord x, y; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -576,7 +576,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_PIXELREAD LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) { netPriv * priv; - uint16_t buf[3]; + gU16 buf[3]; gColor data; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -609,7 +609,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL LLDSPEC void gdisp_lld_vertical_scroll(GDisplay *g) { netPriv * priv; - uint16_t buf[6]; + gU16 buf[6]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -635,7 +635,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL LLDSPEC void gdisp_lld_control(GDisplay *g) { netPriv * priv; - uint16_t buf[3]; + gU16 buf[3]; gBool allgood; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -657,9 +657,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { return; break; case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (uint16_t)(int)g->p.ptr) + if (g->g.Backlight == (gU16)(int)g->p.ptr) return; - if ((uint16_t)(int)g->p.ptr > 100) + if ((gU16)(int)g->p.ptr > 100) g->p.ptr = (void *)100; break; default: @@ -670,7 +670,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { priv = g->priv; buf[0] = GNETCODE_CONTROL; buf[1] = g->p.x; - buf[2] = (uint16_t)(int)g->p.ptr; + buf[2] = (gU16)(int)g->p.ptr; MUTEX_ENTER; sendpkt(priv->netfd, buf, 3); MUTEX_EXIT; @@ -709,7 +709,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->g.Powermode = (gPowermode)g->p.ptr; break; case GDISP_CONTROL_BACKLIGHT: - g->g.Backlight = (uint16_t)(int)g->p.ptr; + g->g.Backlight = (gU16)(int)g->p.ptr; break; } } diff --git a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp index 11b4b144..0e5381e5 100644 --- a/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp +++ b/drivers/multiple/uGFXnetESP8266/gdisp_lld_uGFXnetESP8266.cpp @@ -117,10 +117,10 @@ static gBool uGFXInitDone; typedef struct netPriv { CLIENTFD netfd; // The current client unsigned databytes; // How many bytes have been read - uint16_t data[2]; // Buffer for storing data read. + gU16 data[2]; // Buffer for storing data read. #if GINPUT_NEED_MOUSE gCoord mousex, mousey; - uint16_t mousebuttons; + gU16 mousebuttons; GMouse * mouse; #endif } netPriv; @@ -148,12 +148,12 @@ static void endcon(GDisplay *g) { /** * Send a whole packet of data. - * Len is specified in the number of uint16_t's we want to send as our protocol only talks uint16_t's. + * Len is specified in the number of gU16's we want to send as our protocol only talks gU16's. * Note that contents of the packet are modified to ensure it will cross the wire in the correct format. * If the connection closes before we send all the data - the call returns gFalse. */ -static gBool sendpkt(CLIENTFD fd, uint16_t *pkt, int len) { - // Convert each uint16_t to network order +static gBool sendpkt(CLIENTFD fd, gU16 *pkt, int len) { + // Convert each gU16 to network order #if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_LITTLE { int i; @@ -164,8 +164,8 @@ static gBool sendpkt(CLIENTFD fd, uint16_t *pkt, int len) { #endif // Send it - len *= sizeof(uint16_t); - return fd->write((uint8_t *)pkt, len) == len; + len *= sizeof(gU16); + return fd->write((gU8 *)pkt, len) == len; } static void rxdata(GDisplay *g) { @@ -197,7 +197,7 @@ static void rxdata(GDisplay *g) { } // Get the data - if ((len = fd->read(((uint8_t *)priv->data)+priv->databytes, sizeof(priv->data)-priv->databytes, 0)) <= 0) { + if ((len = fd->read(((gU8 *)priv->data)+priv->databytes, sizeof(priv->data)-priv->databytes, 0)) <= 0) { // Socket closed or in error state MUTEX_EXIT; endcon(g); @@ -348,7 +348,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_FLUSH LLDSPEC void gdisp_lld_flush(GDisplay *g) { netPriv * priv; - uint16_t buf[1]; + gU16 buf[1]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -369,7 +369,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_DRAWPIXEL LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { netPriv * priv; - uint16_t buf[4]; + gU16 buf[4]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -395,7 +395,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_FILLS LLDSPEC void gdisp_lld_fill_area(GDisplay *g) { netPriv * priv; - uint16_t buf[6]; + gU16 buf[6]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -422,7 +422,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { netPriv * priv; gPixel * buffer; - uint16_t buf[5]; + gU16 buf[5]; gCoord x, y; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -459,7 +459,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_PIXELREAD LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) { netPriv * priv; - uint16_t buf[3]; + gU16 buf[3]; gColor data; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -492,7 +492,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_NEED_SCROLL && GDISP_HARDWARE_SCROLL LLDSPEC void gdisp_lld_vertical_scroll(GDisplay *g) { netPriv * priv; - uint16_t buf[6]; + gU16 buf[6]; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY if (!(g->flags & GDISP_FLG_CONNECTED)) @@ -518,7 +518,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { #if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL LLDSPEC void gdisp_lld_control(GDisplay *g) { netPriv * priv; - uint16_t buf[3]; + gU16 buf[3]; gBool allgood; #if GDISP_DONT_WAIT_FOR_NET_DISPLAY @@ -540,9 +540,9 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { return; break; case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (uint16_t)(int)g->p.ptr) + if (g->g.Backlight == (gU16)(int)g->p.ptr) return; - if ((uint16_t)(int)g->p.ptr > 100) + if ((gU16)(int)g->p.ptr > 100) g->p.ptr = (void *)100; break; default: @@ -553,7 +553,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { priv = g->priv; buf[0] = GNETCODE_CONTROL; buf[1] = g->p.x; - buf[2] = (uint16_t)(int)g->p.ptr; + buf[2] = (gU16)(int)g->p.ptr; MUTEX_ENTER; sendpkt(priv->netfd, buf, 3); MUTEX_EXIT; @@ -592,7 +592,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) { g->g.Powermode = (gPowermode)g->p.ptr; break; case GDISP_CONTROL_BACKLIGHT: - g->g.Backlight = (uint16_t)(int)g->p.ptr; + g->g.Backlight = (gU16)(int)g->p.ptr; break; } } |