Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_mouse.c @ 5202:164f20ba08eb
Updated the DirectFB support, from Couriersud
attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.
The directfb renderdriver right now still depends on a some "includes"
from src/video/directfb. That's why it is not yet moved to the new
render folder.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 05 Feb 2011 16:07:10 -0800 |
parents | b196d2758026 |
children | 58265e606e4e |
comparison
equal
deleted
inserted
replaced
5201:7c3422025c35 | 5202:164f20ba08eb |
---|---|
16 License along with this library; if not, write to the Free Software | 16 License along with this library; if not, write to the Free Software |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 | |
22 SDL1.3 DirectFB driver by couriersud@arcor.de | |
23 | |
21 */ | 24 */ |
25 | |
22 #include "SDL_config.h" | 26 #include "SDL_config.h" |
23 | 27 |
24 #include "SDL_DirectFB_video.h" | 28 #include "SDL_DirectFB_video.h" |
25 | 29 |
26 #include "../SDL_sysvideo.h" | 30 #include "../SDL_sysvideo.h" |
121 SDL_Cursor *cursor; | 125 SDL_Cursor *cursor; |
122 Uint32 *dest; | 126 Uint32 *dest; |
123 Uint32 *p; | 127 Uint32 *p; |
124 int pitch, i; | 128 int pitch, i; |
125 | 129 |
126 SDL_DFB_CALLOC(cursor, 1, sizeof(*cursor)); | 130 SDL_DFB_ALLOC_CLEAR(cursor, 1, sizeof(*cursor)); |
127 SDL_DFB_CALLOC(curdata, 1, sizeof(*curdata)); | 131 SDL_DFB_ALLOC_CLEAR(curdata, 1, sizeof(*curdata)); |
128 | 132 |
129 dsc.flags = | 133 dsc.flags = |
130 DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS; | 134 DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_CAPS; |
131 dsc.caps = DSCAPS_VIDEOONLY; | 135 dsc.caps = DSCAPS_VIDEOONLY; |
132 dsc.width = surface->w; | 136 dsc.width = surface->w; |
173 (DFB_DisplayData *) display->driverdata; | 177 (DFB_DisplayData *) display->driverdata; |
174 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; | 178 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; |
175 | 179 |
176 if (cursor) | 180 if (cursor) |
177 SDL_DFB_CHECKERR(windata->window-> | 181 SDL_DFB_CHECKERR(windata->window-> |
178 SetCursorShape(windata->window, | 182 SetCursorShape(windata->dfbwin, |
179 curdata->surf, curdata->hotx, | 183 curdata->surf, curdata->hotx, |
180 curdata->hoty)); | 184 curdata->hoty)); |
181 | 185 |
182 SDL_DFB_CHECKERR(dispdata->layer-> | 186 SDL_DFB_CHECKERR(dispdata->layer-> |
183 SetCooperativeLevel(dispdata->layer, | 187 SetCooperativeLevel(dispdata->layer, |
222 DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; | 226 DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; |
223 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; | 227 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; |
224 DFBResult ret; | 228 DFBResult ret; |
225 int cx, cy; | 229 int cx, cy; |
226 | 230 |
227 SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy)); | 231 SDL_DFB_CHECKERR(windata->dfbwin->GetPosition(windata->dfbwin, &cx, &cy)); |
228 SDL_DFB_CHECKERR(dispdata->layer->WarpCursor(dispdata->layer, | 232 SDL_DFB_CHECKERR(dispdata->layer->WarpCursor(dispdata->layer, |
229 cx + x + windata->client.x, | 233 cx + x + windata->client.x, |
230 cy + y + windata->client.y)); | 234 cy + y + windata->client.y)); |
231 | 235 |
232 error: | 236 error: |
251 } | 255 } |
252 | 256 |
253 void | 257 void |
254 DirectFB_QuitMouse(_THIS) | 258 DirectFB_QuitMouse(_THIS) |
255 { | 259 { |
256 //SDL_DFB_DEVICEDATA(_this); | |
257 } | 260 } |
258 | 261 |
259 | 262 |
260 #endif | 263 #endif |
261 | 264 |