Mercurial > sdl-ios-xcode
diff src/video/directfb/SDL_DirectFB_mouse.c @ 2259:1e690901ecd7
Date: Fri, 17 Aug 2007 01:12:31 +0200
From: Couriersud
Subject: fix for audio dsp exit crash / various dfb issues
improved cursor handling
fixes some mouse and event related bugs
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 17 Aug 2007 02:54:50 +0000 |
parents | 0e70b4b8cf84 |
children | e1da92da346c e82a0e3e9b0e |
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_mouse.c Fri Aug 17 02:54:12 2007 +0000 +++ b/src/video/directfb/SDL_DirectFB_mouse.c Fri Aug 17 02:54:50 2007 +0000 @@ -112,6 +112,7 @@ static int DirectFB_ShowCursor(SDL_Cursor * cursor) { + //FIXME check for null cursor here SDL_DFB_CURSORDATA(cursor); SDL_VideoDevice *dev = SDL_GetVideoDevice(); SDL_DFB_DEVICEDATA(dev); @@ -130,32 +131,22 @@ SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; - SDL_DFB_CHECKERR(windata->window-> - SetCursorShape(windata->window, curdata->surf, - curdata->hotx, curdata->hoty)); + + if (cursor) + SDL_DFB_CHECKERR(windata->window-> + SetCursorShape(windata->window, curdata->surf, + curdata->hotx, curdata->hoty)); //FIXME: This is somehow a directfb issue + //TODO: Check administrative SDL_DFB_CHECKERR(dispdata->layer-> SetCooperativeLevel(dispdata->layer, DLSCL_ADMINISTRATIVE)); SDL_DFB_CHECKERR(dispdata->layer-> - SetCursorOpacity(dispdata->layer, 0xC0)); + SetCursorOpacity(dispdata->layer, + cursor ? 0xC0 : 0x00)); SDL_DFB_CHECKERR(dispdata->layer-> SetCooperativeLevel(dispdata->layer, DLSCL_SHARED)); } -#if 0 - //TODO: Check administrative - SDL_DFB_CHECKERR(dispdata->layer-> - SetCooperativeLevel(dispdata->layer, - DLSCL_ADMINISTRATIVE)); - SDL_DFB_CHECKERR(dispdata->layer-> - SetCursorShape(dispdata->layer, curdata->surf, - curdata->hotx, curdata->hoty)); - SDL_DFB_CHECKERR(dispdata->layer-> - SetCursorOpacity(dispdata->layer, 0xC0)); - SDL_DFB_CHECKERR(dispdata->layer-> - SetCooperativeLevel(dispdata->layer, DLSCL_SHARED)); - -#endif return 0; error: