src/video/directfb/SDL_DirectFB_render.c
changeset 7860 2b0bcdea3a79
parent 7751 2f679aa69aea
child 8093 b43765095a6f
equal deleted inserted replaced
7859:af63b63e7aac 7860:2b0bcdea3a79
   165 #if (DFB_VERSION_ATLEAST(1,2,0))
   165 #if (DFB_VERSION_ATLEAST(1,2,0))
   166     DFBSurfaceRenderOptions render_options;
   166     DFBSurfaceRenderOptions render_options;
   167 #endif
   167 #endif
   168 } DirectFB_TextureData;
   168 } DirectFB_TextureData;
   169 
   169 
   170 static __inline__ void
   170 static SDL_INLINE void
   171 SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr)
   171 SDLtoDFBRect(const SDL_Rect * sr, DFBRectangle * dr)
   172 {
   172 {
   173     dr->x = sr->x;
   173     dr->x = sr->x;
   174     dr->y = sr->y;
   174     dr->y = sr->y;
   175     dr->h = sr->h;
   175     dr->h = sr->h;
   176     dr->w = sr->w;
   176     dr->w = sr->w;
   177 }
   177 }
   178 static __inline__ void
   178 static SDL_INLINE void
   179 SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
   179 SDLtoDFBRect_Float(const SDL_FRect * sr, DFBRectangle * dr)
   180 {
   180 {
   181     dr->x = sr->x;
   181     dr->x = sr->x;
   182     dr->y = sr->y;
   182     dr->y = sr->y;
   183     dr->h = sr->h;
   183     dr->h = sr->h;
   209         return 0;
   209         return 0;
   210     }
   210     }
   211 #endif
   211 #endif
   212 }
   212 }
   213 
   213 
   214 static inline IDirectFBSurface *get_dfb_surface(SDL_Window *window)
   214 static SDL_INLINE IDirectFBSurface *get_dfb_surface(SDL_Window *window)
   215 {
   215 {
   216     SDL_SysWMinfo wm_info;
   216     SDL_SysWMinfo wm_info;
   217     SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
   217     SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
   218 
   218 
   219     SDL_VERSION(&wm_info.version);
   219     SDL_VERSION(&wm_info.version);
   220     SDL_GetWindowWMInfo(window, &wm_info);
   220     SDL_GetWindowWMInfo(window, &wm_info);
   221 
   221 
   222     return wm_info.info.dfb.surface;
   222     return wm_info.info.dfb.surface;
   223 }
   223 }
   224 
   224 
   225 static inline IDirectFBWindow *get_dfb_window(SDL_Window *window)
   225 static SDL_INLINE IDirectFBWindow *get_dfb_window(SDL_Window *window)
   226 {
   226 {
   227     SDL_SysWMinfo wm_info;
   227     SDL_SysWMinfo wm_info;
   228     SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
   228     SDL_memset(&wm_info, 0, sizeof(SDL_SysWMinfo));
   229 
   229 
   230     SDL_VERSION(&wm_info.version);
   230     SDL_VERSION(&wm_info.version);