Lines Matching refs:sdl
1 /* Blackfin GUI (SDL) helper code
25 # include <SDL.h>
57 } sdl;
94 /* Load the SDL lib on the fly to avoid hard linking against it. */
107 if (sdl.handle)
110 sdl.handle = dlopen (libsdl_soname, RTLD_LAZY);
111 if (sdl.handle == NULL)
114 funcs = (void *) &sdl.Init;
117 funcs[i] = dlsym (sdl.handle, sdl_syms[i]);
120 dlclose (sdl.handle);
121 sdl.handle = NULL;
139 /* Create an SDL window if enabled and we don't have one yet. */
146 if (sdl.Init (SDL_INIT_VIDEO))
152 sdl.WM_SetCaption (bfin_gui_window_title, NULL);
153 gui->screen = sdl.SetVideoMode (width, height, 32,
156 gui->window = sdl.CreateWindow (
161 sdl.Quit();
165 gui->screen = sdl.GetWindowSurface(gui->window);
169 sdl.Quit();
173 sdl.ShowCursor (0);
187 sdl.Quit();
208 if (sdl.LockSurface (dst))
225 sdl.GetRGB (pix, format, &r, &g, &b);
227 *pixels++ = sdl.MapRGB (dst->format, r, g, b);
233 sdl.UnlockSurface (dst);
236 sdl.UpdateRect (dst, 0, dsty, dst->w, 1);
246 sdl.UpdateWindowSurfaceRects (win, &rect, 1);
325 /* Since we declare the pixel formats above for SDL 1, we have the bpp
326 setting, but SDL 2 internally uses larger values for its own memory, so
327 we can't assume the Blackfin pixel format sizes always match SDL. */
371 return sdl.AllocFormat (color_spaces[i].format);