Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_mouse.c @ 3013:8cc00819c8d6
Reverted Bob's indent checkin
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 10 Jan 2009 21:50:26 +0000 |
parents | 8f4ed5ec2b06 |
children | d72a0dd80e8b |
comparison
equal
deleted
inserted
replaced
3012:7e30c2dc7783 | 3013:8cc00819c8d6 |
---|---|
130 dsc.caps = DSCAPS_VIDEOONLY; | 130 dsc.caps = DSCAPS_VIDEOONLY; |
131 dsc.width = surface->w; | 131 dsc.width = surface->w; |
132 dsc.height = surface->h; | 132 dsc.height = surface->h; |
133 dsc.pixelformat = DSPF_ARGB; | 133 dsc.pixelformat = DSPF_ARGB; |
134 | 134 |
135 SDL_DFB_CHECKERR(devdata-> | 135 SDL_DFB_CHECKERR(devdata->dfb-> |
136 dfb->CreateSurface(devdata->dfb, &dsc, &curdata->surf)); | 136 CreateSurface(devdata->dfb, &dsc, &curdata->surf)); |
137 curdata->hotx = hot_x; | 137 curdata->hotx = hot_x; |
138 curdata->hoty = hot_y; | 138 curdata->hoty = hot_y; |
139 cursor->driverdata = curdata; | 139 cursor->driverdata = curdata; |
140 | 140 |
141 SDL_DFB_CHECKERR(curdata-> | 141 SDL_DFB_CHECKERR(curdata->surf-> |
142 surf->Lock(curdata->surf, DSLF_WRITE, (void *) &dest, | 142 Lock(curdata->surf, DSLF_WRITE, (void *) &dest, &pitch)); |
143 &pitch)); | |
144 | 143 |
145 /* Relies on the fact that this is only called with ARGB surface. */ | 144 /* Relies on the fact that this is only called with ARGB surface. */ |
146 p = surface->pixels; | 145 p = surface->pixels; |
147 for (i = 0; i < surface->h; i++) | 146 for (i = 0; i < surface->h; i++) |
148 memcpy((char *) dest + i * pitch, (char *) p + i * surface->pitch, | 147 memcpy((char *) dest + i * pitch, (char *) p + i * surface->pitch, |
173 DFB_DisplayData *dispdata = | 172 DFB_DisplayData *dispdata = |
174 (DFB_DisplayData *) display->driverdata; | 173 (DFB_DisplayData *) display->driverdata; |
175 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; | 174 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; |
176 | 175 |
177 if (cursor) | 176 if (cursor) |
178 SDL_DFB_CHECKERR(windata-> | 177 SDL_DFB_CHECKERR(windata->window-> |
179 window->SetCursorShape(windata->window, | 178 SetCursorShape(windata->window, |
180 curdata->surf, | 179 curdata->surf, curdata->hotx, |
181 curdata->hotx, | 180 curdata->hoty)); |
182 curdata->hoty)); | |
183 | 181 |
184 /* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */ | 182 /* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */ |
185 SDL_DFB_CHECKERR(dispdata-> | 183 SDL_DFB_CHECKERR(dispdata->layer-> |
186 layer->SetCooperativeLevel(dispdata->layer, | 184 SetCooperativeLevel(dispdata->layer, |
187 DLSCL_ADMINISTRATIVE)); | 185 DLSCL_ADMINISTRATIVE)); |
188 SDL_DFB_CHECKERR(dispdata-> | 186 SDL_DFB_CHECKERR(dispdata->layer-> |
189 layer->SetCursorOpacity(dispdata->layer, | 187 SetCursorOpacity(dispdata->layer, |
190 cursor ? 0xC0 : 0x00)); | 188 cursor ? 0xC0 : 0x00)); |
191 SDL_DFB_CHECKERR(dispdata-> | 189 SDL_DFB_CHECKERR(dispdata->layer-> |
192 layer->SetCooperativeLevel(dispdata->layer, | 190 SetCooperativeLevel(dispdata->layer, |
193 DLSCL_SHARED)); | 191 DLSCL_SHARED)); |
194 } | 192 } |
195 } | 193 } |
196 | 194 |
197 return 0; | 195 return 0; |
198 error: | 196 error: |
227 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; | 225 DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; |
228 DFBResult ret; | 226 DFBResult ret; |
229 int cx, cy; | 227 int cx, cy; |
230 | 228 |
231 SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy)); | 229 SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy)); |
232 SDL_DFB_CHECKERR(dispdata-> | 230 SDL_DFB_CHECKERR(dispdata->layer-> |
233 layer->WarpCursor(dispdata->layer, cx + x, cy + y)); | 231 WarpCursor(dispdata->layer, cx + x, cy + y)); |
234 | 232 |
235 error: | 233 error: |
236 return; | 234 return; |
237 } | 235 } |
238 | 236 |