@@ -66,9 +66,11 @@ module SDL.Raw.Types (
6666 Palette (.. ),
6767 PixelFormat (.. ),
6868 Point (.. ),
69- FPoint (.. ),
7069 Rect (.. ),
70+ #ifdef RECENT_ISH
71+ FPoint (.. ),
7172 FRect (.. ),
73+ #endif
7274 RendererInfo (.. ),
7375 RWops (.. ),
7476 Surface (.. ),
@@ -1334,22 +1336,6 @@ instance Storable Point where
13341336 (# poke SDL_Point , x) ptr x
13351337 (# poke SDL_Point , y) ptr y
13361338
1337- data FPoint = FPoint
1338- { fPointX :: ! CFloat
1339- , fPointY :: ! CFloat
1340- } deriving (Eq , Show , Typeable )
1341-
1342- instance Storable FPoint where
1343- sizeOf _ = (# size SDL_FPoint )
1344- alignment = sizeOf
1345- peek ptr = do
1346- x <- (# peek SDL_FPoint , x) ptr
1347- y <- (# peek SDL_FPoint , y) ptr
1348- return $! FPoint x y
1349- poke ptr (FPoint x y) = do
1350- (# poke SDL_FPoint , x) ptr x
1351- (# poke SDL_FPoint , y) ptr y
1352-
13531339data Rect = Rect
13541340 { rectX :: ! CInt
13551341 , rectY :: ! CInt
@@ -1372,6 +1358,24 @@ instance Storable Rect where
13721358 (# poke SDL_Rect , w) ptr w
13731359 (# poke SDL_Rect , h) ptr h
13741360
1361+ #ifdef RECENT_ISH
1362+
1363+ data FPoint = FPoint
1364+ { fPointX :: ! CFloat
1365+ , fPointY :: ! CFloat
1366+ } deriving (Eq , Show , Typeable )
1367+
1368+ instance Storable FPoint where
1369+ sizeOf _ = (# size SDL_FPoint )
1370+ alignment = sizeOf
1371+ peek ptr = do
1372+ x <- (# peek SDL_FPoint , x) ptr
1373+ y <- (# peek SDL_FPoint , y) ptr
1374+ return $! FPoint x y
1375+ poke ptr (FPoint x y) = do
1376+ (# poke SDL_FPoint , x) ptr x
1377+ (# poke SDL_FPoint , y) ptr y
1378+
13751379data FRect = FRect
13761380 { fRectX :: ! CFloat
13771381 , fRectY :: ! CFloat
@@ -1394,6 +1398,8 @@ instance Storable FRect where
13941398 (# poke SDL_FRect , w) ptr w
13951399 (# poke SDL_FRect , h) ptr h
13961400
1401+ #endif
1402+
13971403data RendererInfo = RendererInfo
13981404 { rendererInfoName :: ! CString
13991405 , rendererInfoFlags :: ! Word32
0 commit comments